home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 7 code / QuickTime.sea / QuickTime / SimpleInMovies / SimpleInUtils.c < prev    next >
MacBinary  |  1992-10-16  |  12.1 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Oct 15 20:17:21 1992, modified Thu Oct 15 20:17:21 1992, creator 'MPS ', type ASCII, 11697 bytes "SimpleInUtils.c" , at 0x2e31 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 53 69 6d 70 6c 65 | 49 6e 55 74 69 6c 73 2e |..Simple|InUtils.|
|00000010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2d b1 00 | 00 01 ac a7 03 ba 91 a7 |.....-..|........|
|00000060| 03 ba 91 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 cc 21 00 00 |........|.....!..|
|00000080| 0d 2f 2a 20 09 0d 53 69 | 6d 70 6c 65 49 6e 4d 6f |./* ..Si|mpleInMo|
|00000090| 76 69 65 73 0d 0d 53 61 | 6d 70 6c 65 20 70 72 6f |vies..Sa|mple pro|
|000000a0| 67 72 61 6d 73 20 64 65 | 6d 6f 6e 73 74 72 61 74 |grams de|monstrat|
|000000b0| 69 6e 67 20 68 6f 77 20 | 74 6f 20 6f 70 65 6e 20 |ing how |to open |
|000000c0| 61 6e 64 20 64 69 73 70 | 6c 61 79 0d 51 75 69 63 |and disp|lay.Quic|
|000000d0| 6b 54 69 6d 65 aa 20 4d | 6f 76 69 65 73 2e 0d 0d |kTime. M|ovies...|
|000000e0| 53 69 6d 70 6c 65 49 6e | 55 74 69 6c 73 2e 63 20 |SimpleIn|Utils.c |
|000000f0| 66 69 6c 65 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |file con|tains th|
|00000100| 65 20 63 6f 64 65 20 66 | 6f 72 20 74 68 65 20 72 |e code f|or the r|
|00000110| 6f 75 74 69 6e 65 73 20 | 0d 63 61 6c 6c 65 64 20 |outines |.called |
|00000120| 75 70 6f 6e 20 77 68 65 | 6e 20 64 65 61 6c 69 6e |upon whe|n dealin|
|00000130| 67 20 77 69 74 68 20 74 | 68 65 20 64 69 61 6c 6f |g with t|he dialo|
|00000140| 67 73 20 75 73 65 64 20 | 74 6f 20 73 61 76 65 20 |gs used |to save |
|00000150| 6d 6f 76 69 65 73 2e 0d | 54 68 65 73 65 20 63 61 |movies..|These ca|
|00000160| 6c 6c 73 20 63 61 6d 65 | 20 61 6c 6d 6f 73 74 20 |lls came| almost |
|00000170| 75 6e 74 6f 75 63 68 65 | 64 20 66 72 6f 6d 20 74 |untouche|d from t|
|00000180| 68 65 20 44 54 53 20 55 | 74 69 6c 69 74 69 65 73 |he DTS U|tilities|
|00000190| 20 66 69 6c 65 73 2c 0d | 6e 6f 74 65 20 74 68 6f | files,.|note tho|
|000001a0| 75 67 68 20 74 68 61 74 | 20 73 6f 6d 65 20 77 65 |ugh that| some we|
|000001b0| 72 65 20 65 64 69 74 65 | 64 20 74 6f 20 6d 61 6b |re edite|d to mak|
|000001c0| 65 20 74 68 65 6d 20 66 | 69 74 20 74 68 65 20 6e |e them f|it the n|
|000001d0| 65 65 64 73 20 6f 66 20 | 74 68 69 73 0d 73 61 6d |eeds of |this.sam|
|000001e0| 70 6c 65 2e 0d 0d 47 75 | 69 6c 6c 65 72 6d 6f 20 |ple...Gu|illermo |
|000001f0| 41 2e 20 4f 72 74 69 7a | 0d 4d 61 63 69 6e 74 6f |A. Ortiz|.Macinto|
|00000200| 73 68 20 44 65 76 65 6c | 6f 70 65 72 20 54 65 63 |sh Devel|oper Tec|
|00000210| 68 6e 69 63 61 6c 20 53 | 75 70 70 6f 72 74 0d 0d |hnical S|upport..|
|00000220| 30 38 2f 31 33 2f 39 31 | 20 43 72 65 61 74 65 64 |08/13/91| Created|
|00000230| 20 74 68 65 20 66 69 6c | 65 20 74 6f 20 6d 6f 76 | the fil|e to mov|
|00000240| 65 20 69 6e 20 75 74 69 | 6c 69 74 69 65 73 20 63 |e in uti|lities c|
|00000250| 61 6c 6c 73 2e 0d 31 31 | 2f 31 39 2f 39 31 20 41 |alls..11|/19/91 A|
|00000260| 64 64 65 64 20 73 74 75 | 66 66 20 74 6f 20 68 61 |dded stu|ff to ha|
|00000270| 76 65 20 63 75 73 74 6f | 6d 20 64 69 61 6c 6f 67 |ve custo|m dialog|
|00000280| 20 69 6e 20 50 75 74 46 | 69 6c 65 20 74 6f 20 68 | in PutF|ile to h|
|00000290| 61 6e 64 6c 65 20 66 6c | 61 74 74 65 6e 69 6e 67 |andle fl|attening|
|000002a0| 2e 0d 2a 2f 0d 0d 23 69 | 6e 63 6c 75 64 65 20 3c |..*/..#i|nclude <|
|000002b0| 53 69 6d 70 6c 65 49 6e | 4d 6f 76 69 65 2e 68 3e |SimpleIn|Movie.h>|
|000002c0| 0d 0d 6c 6f 6e 67 20 67 | 46 6c 61 74 74 65 6e 4d |..long g|FlattenM|
|000002d0| 6f 76 69 65 73 20 3d 20 | 31 3b 0d 0d 44 69 61 6c |ovies = |1;..Dial|
|000002e0| 6f 67 50 74 72 20 47 65 | 74 43 65 6e 74 65 72 65 |ogPtr Ge|tCentere|
|000002f0| 64 44 69 61 6c 6f 67 28 | 73 68 6f 72 74 2c 20 57 |dDialog(|short, W|
|00000300| 69 6e 64 6f 77 50 74 72 | 2c 20 57 69 6e 64 6f 77 |indowPtr|, Window|
|00000310| 50 74 72 29 3b 0d 76 6f | 69 64 20 4f 75 74 6c 69 |Ptr);.vo|id Outli|
|00000320| 6e 65 44 69 61 6c 6f 67 | 49 74 65 6d 28 44 69 61 |neDialog|Item(Dia|
|00000330| 6c 6f 67 50 74 72 2c 20 | 73 68 6f 72 74 29 3b 0d |logPtr, |short);.|
|00000340| 70 61 73 63 61 6c 20 42 | 6f 6f 6c 65 61 6e 09 6b |pascal B|oolean.k|
|00000350| 65 79 45 71 75 69 76 46 | 69 6c 74 65 72 28 44 69 |eyEquivF|ilter(Di|
|00000360| 61 6c 6f 67 50 74 72 2c | 20 45 76 65 6e 74 52 65 |alogPtr,| EventRe|
|00000370| 63 6f 72 64 20 2a 2c 20 | 73 68 6f 72 74 20 2a 29 |cord *, |short *)|
|00000380| 3b 0d 48 61 6e 64 6c 65 | 09 47 65 74 41 70 70 52 |;.Handle|.GetAppR|
|00000390| 65 73 6f 75 72 63 65 28 | 52 65 73 54 79 70 65 2c |esource(|ResType,|
|000003a0| 73 68 6f 72 74 2c 20 4f | 53 45 72 72 20 2a 29 3b |short, O|SErr *);|
|000003b0| 0d 42 6f 6f 6c 65 61 6e | 20 44 69 73 70 6c 61 79 |.Boolean| Display|
|000003c0| 50 75 74 46 69 6c 65 28 | 53 74 61 6e 64 61 72 64 |PutFile(|Standard|
|000003d0| 46 69 6c 65 52 65 70 6c | 79 20 2a 29 3b 0d 76 6f |FileRepl|y *);.vo|
|000003e0| 69 64 09 4f 75 74 6c 69 | 6e 65 43 6f 6e 74 72 6f |id.Outli|neContro|
|000003f0| 6c 28 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 29 |l(Contro|lHandle)|
|00000400| 3b 0d 52 65 63 74 09 43 | 65 6e 74 65 72 57 69 6e |;.Rect.C|enterWin|
|00000410| 64 6f 77 28 57 69 6e 64 | 6f 77 50 74 72 2c 20 57 |dow(Wind|owPtr, W|
|00000420| 69 6e 64 6f 77 50 74 72 | 29 3b 0d 73 68 6f 72 74 |indowPtr|);.short|
|00000430| 09 47 65 74 48 65 78 42 | 79 74 65 28 63 68 61 72 |.GetHexB|yte(char|
|00000440| 20 2a 29 3b 0d 63 68 61 | 72 09 4c 6f 63 6b 48 61 | *);.cha|r.LockHa|
|00000450| 6e 64 6c 65 48 69 67 68 | 28 48 61 6e 64 6c 65 29 |ndleHigh|(Handle)|
|00000460| 3b 0d 47 44 48 61 6e 64 | 6c 65 09 47 65 74 52 65 |;.GDHand|le.GetRe|
|00000470| 63 74 44 65 76 69 63 65 | 28 52 65 63 74 29 3b 0d |ctDevice|(Rect);.|
|00000480| 52 65 63 74 09 47 65 74 | 57 69 6e 64 6f 77 44 65 |Rect.Get|WindowDe|
|00000490| 76 69 63 65 52 65 63 74 | 4e 4d 42 28 57 69 6e 64 |viceRect|NMB(Wind|
|000004a0| 6f 77 50 74 72 29 3b 0d | 52 65 63 74 09 47 65 74 |owPtr);.|Rect.Get|
|000004b0| 57 69 6e 64 6f 77 44 65 | 76 69 63 65 52 65 63 74 |WindowDe|viceRect|
|000004c0| 28 57 69 6e 64 6f 77 50 | 74 72 20 77 69 6e 64 6f |(WindowP|tr windo|
|000004d0| 77 29 3b 0d 52 65 63 74 | 09 47 65 74 4d 61 69 6e |w);.Rect|.GetMain|
|000004e0| 53 63 72 65 65 6e 52 65 | 63 74 28 76 6f 69 64 29 |ScreenRe|ct(void)|
|000004f0| 3b 0d 52 65 63 74 09 47 | 65 74 57 69 6e 64 6f 77 |;.Rect.G|etWindow|
|00000500| 53 74 72 75 63 74 75 72 | 65 52 65 63 74 28 57 69 |Structur|eRect(Wi|
|00000510| 6e 64 6f 77 50 74 72 29 | 3b 0d 50 6f 69 6e 74 09 |ndowPtr)|;.Point.|
|00000520| 47 65 74 47 6c 6f 62 61 | 6c 54 6f 70 4c 65 66 74 |GetGloba|lTopLeft|
|00000530| 28 57 69 6e 64 6f 77 50 | 74 72 29 3b 0d 76 6f 69 |(WindowP|tr);.voi|
|00000540| 64 09 50 6f 73 69 74 69 | 6f 6e 52 65 63 74 49 6e |d.Positi|onRectIn|
|00000550| 52 65 63 74 28 52 65 63 | 74 2c 20 52 65 63 74 20 |Rect(Rec|t, Rect |
|00000560| 2a 2c 20 46 69 78 65 64 | 20 2c 20 46 69 78 65 64 |*, Fixed| , Fixed|
|00000570| 29 3b 0d 52 65 63 74 09 | 47 65 74 57 69 6e 64 6f |);.Rect.|GetWindo|
|00000580| 77 43 6f 6e 74 65 6e 74 | 52 65 63 74 28 57 69 6e |wContent|Rect(Win|
|00000590| 64 6f 77 50 74 72 20 77 | 69 6e 64 6f 77 29 3b 0d |dowPtr w|indow);.|
|000005a0| 76 6f 69 64 09 4c 6f 63 | 61 6c 54 6f 47 6c 6f 62 |void.Loc|alToGlob|
|000005b0| 61 6c 52 65 63 74 28 52 | 65 63 74 20 2a 29 3b 0d |alRect(R|ect *);.|
|000005c0| 76 6f 69 64 09 70 73 74 | 72 63 61 74 28 63 68 61 |void.pst|rcat(cha|
|000005d0| 72 20 2a 2c 20 63 68 61 | 72 20 2a 29 3b 0d 76 6f |r *, cha|r *);.vo|
|000005e0| 69 64 09 70 73 74 72 63 | 70 79 28 63 68 61 72 20 |id.pstrc|py(char |
|000005f0| 2a 2c 20 63 68 61 72 20 | 2a 29 3b 0d 0d 2f 2a 2a |*, char |*);../**|
|00000600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000610| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000620| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000630| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000640| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0d 0d 44 69 |********|***/..Di|
|00000650| 61 6c 6f 67 50 74 72 09 | 47 65 74 43 65 6e 74 65 |alogPtr.|GetCente|
|00000660| 72 65 64 44 69 61 6c 6f | 67 28 73 68 6f 72 74 20 |redDialo|g(short |
|00000670| 69 64 2c 20 57 69 6e 64 | 6f 77 50 74 72 20 72 65 |id, Wind|owPtr re|
|00000680| 6c 61 74 65 64 57 69 6e | 64 6f 77 2c 20 57 69 6e |latedWin|dow, Win|
|00000690| 64 6f 77 50 74 72 20 62 | 65 68 69 6e 64 29 0d 7b |dowPtr b|ehind).{|
|000006a0| 0d 09 44 69 61 6c 6f 67 | 54 48 6e 64 6c 09 09 64 |..Dialog|THndl..d|
|000006b0| 6c 6f 67 52 65 73 6f 75 | 72 63 65 3b 0d 09 44 69 |logResou|rce;..Di|
|000006c0| 61 6c 6f 67 50 74 72 09 | 09 64 69 61 6c 6f 67 3b |alogPtr.|.dialog;|
|000006d0| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 09 6f 6c 64 56 |..Boolea|n...oldV|
|000006e0| 69 73 3b 0d 09 63 68 61 | 72 09 09 09 68 73 74 61 |is;..cha|r...hsta|
|000006f0| 74 65 3b 0d 09 4f 53 45 | 72 72 09 09 09 65 72 72 |te;..OSE|rr...err|
|00000700| 3b 0d 09 0d 09 64 69 61 | 6c 6f 67 20 3d 20 6e 69 |;....dia|log = ni|
|00000710| 6c 3b 0d 09 69 66 20 28 | 64 6c 6f 67 52 65 73 6f |l;..if (|dlogReso|
|00000720| 75 72 63 65 20 3d 20 28 | 44 69 61 6c 6f 67 54 48 |urce = (|DialogTH|
|00000730| 6e 64 6c 29 47 65 74 41 | 70 70 52 65 73 6f 75 72 |ndl)GetA|ppResour|
|00000740| 63 65 28 27 44 4c 4f 47 | 27 2c 20 69 64 2c 20 26 |ce('DLOG|', id, &|
|00000750| 65 72 72 29 29 20 7b 0d | 09 09 68 73 74 61 74 65 |err)) {.|..hstate|
|00000760| 20 3d 20 4c 6f 63 6b 48 | 61 6e 64 6c 65 48 69 67 | = LockH|andleHig|
|00000770| 68 28 28 48 61 6e 64 6c | 65 29 64 6c 6f 67 52 65 |h((Handl|e)dlogRe|
|00000780| 73 6f 75 72 63 65 29 3b | 0d 09 09 6f 6c 64 56 69 |source);|...oldVi|
|00000790| 73 20 3d 20 28 2a 64 6c | 6f 67 52 65 73 6f 75 72 |s = (*dl|ogResour|
|000007a0| 63 65 29 2d 3e 76 69 73 | 69 62 6c 65 3b 0d 09 09 |ce)->vis|ible;...|
|000007b0| 28 2a 64 6c 6f 67 52 65 | 73 6f 75 72 63 65 29 2d |(*dlogRe|source)-|
|000007c0| 3e 76 69 73 69 62 6c 65 | 20 3d 20 66 61 6c 73 65 |>visible| = false|
|000007d0| 3b 0d 09 09 69 66 20 28 | 64 69 61 6c 6f 67 20 3d |;...if (|dialog =|
|000007e0| 20 47 65 74 4e 65 77 44 | 69 61 6c 6f 67 28 69 64 | GetNewD|ialog(id|
|000007f0| 2c 20 6e 69 6c 2c 20 62 | 65 68 69 6e 64 29 29 20 |, nil, b|ehind)) |
|00000800| 7b 0d 09 09 09 43 65 6e | 74 65 72 57 69 6e 64 6f |{....Cen|terWindo|
|00000810| 77 28 64 69 61 6c 6f 67 | 2c 20 72 65 6c 61 74 65 |w(dialog|, relate|
|00000820| 64 57 69 6e 64 6f 77 29 | 3b 0d 09 09 09 69 66 20 |dWindow)|;....if |
|00000830| 28 6f 6c 64 56 69 73 29 | 20 53 68 6f 77 57 69 6e |(oldVis)| ShowWin|
|00000840| 64 6f 77 28 64 69 61 6c | 6f 67 29 3b 0d 09 09 7d |dow(dial|og);...}|
|00000850| 0d 09 09 28 2a 64 6c 6f | 67 52 65 73 6f 75 72 63 |...(*dlo|gResourc|
|00000860| 65 29 2d 3e 76 69 73 69 | 62 6c 65 20 3d 20 6f 6c |e)->visi|ble = ol|
|00000870| 64 56 69 73 3b 0d 09 09 | 48 53 65 74 53 74 61 74 |dVis;...|HSetStat|
|00000880| 65 28 28 48 61 6e 64 6c | 65 29 64 6c 6f 67 52 65 |e((Handl|e)dlogRe|
|00000890| 73 6f 75 72 63 65 2c 20 | 68 73 74 61 74 65 29 3b |source, |hstate);|
|000008a0| 0d 09 7d 0d 09 72 65 74 | 75 72 6e 28 64 69 61 6c |..}..ret|urn(dial|
|000008b0| 6f 67 29 3b 0d 7d 0d 0d | 48 61 6e 64 6c 65 09 47 |og);.}..|Handle.G|
|000008c0| 65 74 41 70 70 52 65 73 | 6f 75 72 63 65 28 52 65 |etAppRes|ource(Re|
|000008d0| 73 54 79 70 65 20 74 68 | 65 54 79 70 65 2c 73 68 |sType th|eType,sh|
|000008e0| 6f 72 74 20 74 68 65 49 | 44 2c 20 4f 53 45 72 72 |ort theI|D, OSErr|
|000008f0| 20 2a 65 72 72 29 0d 7b | 0d 09 48 61 6e 64 6c 65 | *err).{|..Handle|
|00000900| 09 72 65 74 75 72 6e 48 | 61 6e 64 6c 65 3b 0d 09 |.returnH|andle;..|
|00000910| 0d 09 72 65 74 75 72 6e | 48 61 6e 64 6c 65 20 3d |..return|Handle =|
|00000920| 20 47 65 74 31 52 65 73 | 6f 75 72 63 65 28 74 68 | Get1Res|ource(th|
|00000930| 65 54 79 70 65 2c 20 74 | 68 65 49 44 29 3b 0d 09 |eType, t|heID);..|
|00000940| 2a 65 72 72 20 3d 20 52 | 65 73 45 72 72 6f 72 28 |*err = R|esError(|
|00000950| 29 3b 0d 09 72 65 74 75 | 72 6e 20 28 72 65 74 75 |);..retu|rn (retu|
|00000960| 72 6e 48 61 6e 64 6c 65 | 29 3b 0d 7d 0d 0d 2f 2a |rnHandle|);.}../*|
|00000970| 20 54 68 65 20 64 69 61 | 6c 6f 67 20 68 6f 6f 6b | The dia|log hook|
|00000980| 20 70 72 6f 63 20 70 72 | 6f 63 65 73 73 65 73 20 | proc pr|ocesses |
|00000990| 74 68 65 20 69 74 65 6d | 20 68 69 74 73 20 69 6e |the item| hits in|
|000009a0| 20 74 68 65 20 63 75 73 | 74 6f 6d 20 70 75 74 20 | the cus|tom put |
|000009b0| 64 69 61 6c 6f 67 3b 0d | 20 20 20 74 68 69 73 20 |dialog;.| this |
|000009c0| 73 61 6d 70 6c 65 20 64 | 6f 65 73 20 74 68 65 20 |sample d|oes the |
|000009d0| 66 6f 6c 6c 6f 77 69 6e | 67 3a 0d 20 20 20 0d 20 |followin|g:. . |
|000009e0| 20 20 6f 6e 20 73 66 48 | 6f 6f 6b 46 69 72 73 74 | on sfH|ookFirst|
|000009f0| 43 61 6c 6c 09 3a 20 69 | 6e 69 74 69 61 6c 69 7a |Call.: i|nitializ|
|00000a00| 65 73 20 74 68 65 20 27 | 46 6c 61 74 74 65 6e 20 |es the '|Flatten |
|00000a10| 4d 6f 76 69 65 27 20 63 | 68 65 63 6b 20 62 6f 78 |Movie' c|heck box|
|00000a20| 2c 20 74 68 65 0d 20 20 | 20 20 20 20 20 20 20 20 |, the. | |
|00000a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a40| 67 6c 6f 62 61 6c 20 66 | 6c 61 67 20 63 6f 6e 74 |global f|lag cont|
|00000a50| 72 6f 6c 6c 69 6e 67 20 | 74 68 69 73 20 73 74 61 |rolling |this sta|
|00000a60| 72 74 73 20 77 69 74 68 | 20 59 45 53 2c 20 66 6c |rts with| YES, fl|
|00000a70| 61 74 74 65 6e 2e 0d 09 | 09 09 09 09 09 20 20 52 |atten...|..... R|
|00000a80| 65 74 75 72 6e 20 73 66 | 48 6f 6f 6b 4e 75 6c 6c |eturn sf|HookNull|
|00000a90| 45 76 65 6e 74 20 74 6f | 20 73 69 67 6e 61 6c 20 |Event to| signal |
|00000aa0| 74 68 65 20 68 69 74 20 | 68 61 73 20 62 65 65 6e |the hit |has been|
|00000ab0| 20 74 61 6b 65 6e 0d 09 | 09 09 09 09 09 20 20 63 | taken..|..... c|
|00000ac0| 61 72 65 20 6f 66 2e 0d | 09 09 09 09 09 20 20 20 |are of..|..... |
|00000ad0| 0d 20 20 20 6f 6e 20 6b | 46 6c 61 74 74 65 6e 4d |. on k|FlattenM|
|00000ae0| 6f 76 69 65 09 09 3a 20 | 74 68 65 20 75 73 65 72 |ovie..: |the user|
|00000af0| 20 63 6c 69 63 6b 65 64 | 20 6f 6e 20 74 68 65 20 | clicked| on the |
|00000b00| 62 6f 78 20 63 68 61 6e | 67 65 20 69 74 20 74 6f |box chan|ge it to|
|00000b10| 20 74 68 65 20 6e 65 77 | 20 73 74 61 74 65 2e 0d | the new| state..|
|00000b20| 09 09 09 09 09 09 20 20 | 52 65 74 75 72 6e 20 73 |...... |Return s|
|00000b30| 66 48 6f 6f 6b 4e 75 6c | 6c 45 76 65 6e 74 20 74 |fHookNul|lEvent t|
|00000b40| 6f 20 73 69 67 6e 61 6c | 20 74 68 65 20 68 69 74 |o signal| the hit|
|00000b50| 20 68 61 73 20 62 65 65 | 6e 20 74 61 6b 65 6e 0d | has bee|n taken.|
|00000b60| 09 09 09 09 09 09 20 20 | 63 61 72 65 20 6f 66 2e |...... |care of.|
|00000b70| 0d 20 20 20 0d 20 20 20 | 6f 6e 20 73 66 49 74 65 |. . |on sfIte|
|00000b80| 6d 4f 70 65 6e 42 75 74 | 74 6f 6e 09 3a 20 74 68 |mOpenBut|ton.: th|
|00000b90| 65 20 75 73 65 72 20 73 | 61 79 73 20 6f 6b 2c 20 |e user s|ays ok, |
|00000ba0| 73 61 76 65 20 74 68 65 | 20 73 74 61 74 65 20 6f |save the| state o|
|00000bb0| 66 20 74 68 65 20 66 6c | 61 74 74 65 6e 20 62 6f |f the fl|atten bo|
|00000bc0| 78 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 09 |x. | .|
|00000bd0| 09 09 20 20 73 6f 20 74 | 68 65 20 6e 65 78 74 20 |.. so t|he next |
|00000be0| 74 69 6d 65 20 69 74 20 | 69 73 20 75 73 65 64 20 |time it |is used |
|00000bf0| 74 6f 20 69 6e 69 74 20 | 74 68 65 20 64 69 61 6c |to init |the dial|
|00000c00| 6f 67 2e 0d 09 09 09 09 | 09 09 20 20 52 65 74 75 |og......|.. Retu|
|00000c10| 72 6e 20 73 66 49 74 65 | 6d 4f 70 65 6e 42 75 74 |rn sfIte|mOpenBut|
|00000c20| 74 6f 6e 20 74 6f 20 6c | 65 74 20 53 46 20 64 6f |ton to l|et SF do|
|00000c30| 20 69 74 73 20 6e 6f 72 | 6d 61 6c 20 73 74 75 66 | its nor|mal stuf|
|00000c40| 66 2e 0d 2a 2f 0d 70 61 | 73 63 61 6c 20 73 68 6f |f..*/.pa|scal sho|
|00000c50| 72 74 20 4d 79 44 6c 6f | 67 48 6f 6f 6b 28 73 68 |rt MyDlo|gHook(sh|
|00000c60| 6f 72 74 20 69 74 65 6d | 2c 20 44 69 61 6c 6f 67 |ort item|, Dialog|
|00000c70| 50 74 72 20 74 68 65 44 | 69 61 6c 6f 67 2c 20 50 |Ptr theD|ialog, P|
|00000c80| 74 72 20 6d 79 44 61 74 | 61 29 0d 7b 0d 73 68 6f |tr myDat|a).{.sho|
|00000c90| 72 74 20 69 74 65 6d 54 | 79 70 65 2c 20 76 61 6c |rt itemT|ype, val|
|00000ca0| 75 65 3b 0d 48 61 6e 64 | 6c 65 20 64 49 74 65 6d |ue;.Hand|le dItem|
|00000cb0| 3b 0d 52 65 63 74 20 62 | 6f 78 3b 0d 0d 09 73 77 |;.Rect b|ox;...sw|
|00000cc0| 69 74 63 68 20 28 69 74 | 65 6d 29 20 7b 0d 09 63 |itch (it|em) {..c|
|00000cd0| 61 73 65 20 09 73 66 48 | 6f 6f 6b 46 69 72 73 74 |ase .sfH|ookFirst|
|00000ce0| 43 61 6c 6c 3a 0d 09 20 | 20 69 66 20 28 2a 28 6c |Call:.. | if (*(l|
|00000cf0| 6f 6e 67 20 2a 29 6d 79 | 44 61 74 61 29 20 7b 20 |ong *)my|Data) { |
|00000d00| 2f 2a 20 63 68 65 63 6b | 20 69 66 20 66 6c 61 74 |/* check| if flat|
|00000d10| 74 65 6e 20 6d 6f 76 69 | 65 20 68 61 73 20 62 65 |ten movi|e has be|
|00000d20| 65 6e 20 73 65 6c 65 63 | 74 65 64 20 61 6e 64 20 |en selec|ted and |
|00000d30| 6d 61 72 6b 20 62 6f 78 | 20 61 63 63 6f 72 64 69 |mark box| accordi|
|00000d40| 6e 67 6c 79 20 2a 2f 0d | 09 09 47 65 74 44 49 74 |ngly */.|..GetDIt|
|00000d50| 65 6d 28 74 68 65 44 69 | 61 6c 6f 67 2c 20 6b 46 |em(theDi|alog, kF|
|00000d60| 6c 61 74 74 65 6e 4d 6f | 76 69 65 2c 20 26 69 74 |lattenMo|vie, &it|
|00000d70| 65 6d 54 79 70 65 2c 20 | 26 64 49 74 65 6d 2c 20 |emType, |&dItem, |
|00000d80| 26 62 6f 78 29 3b 0d 09 | 09 20 20 69 66 20 28 69 |&box);..|. if (i|
|00000d90| 74 65 6d 54 79 70 65 20 | 3d 3d 20 28 63 74 72 6c |temType |== (ctrl|
|00000da0| 49 74 65 6d 2b 63 68 6b | 43 74 72 6c 29 29 20 7b |Item+chk|Ctrl)) {|
|00000db0| 20 2f 2a 20 69 73 20 74 | 68 69 73 20 6f 75 72 20 | /* is t|his our |
|00000dc0| 69 74 65 6d 3f 20 2a 2f | 0d 09 09 20 20 53 65 74 |item? */|... Set|
|00000dd0| 43 74 6c 56 61 6c 75 65 | 28 28 43 6f 6e 74 72 6f |CtlValue|((Contro|
|00000de0| 6c 48 61 6e 64 6c 65 29 | 64 49 74 65 6d 2c 20 31 |lHandle)|dItem, 1|
|00000df0| 29 3b 20 2f 2a 20 63 68 | 65 63 6b 20 74 68 65 20 |); /* ch|eck the |
|00000e00| 62 6f 78 2c 20 63 6f 6d | 65 73 20 75 6e 63 68 65 |box, com|es unche|
|00000e10| 63 6b 65 64 20 66 72 6f | 6d 20 72 65 73 6f 75 72 |cked fro|m resour|
|00000e20| 63 65 20 2a 2f 0d 09 09 | 7d 0d 09 20 20 7d 0d 09 |ce */...|}.. }..|
|00000e30| 20 20 72 65 74 75 72 6e | 20 73 66 48 6f 6f 6b 4e | return| sfHookN|
|00000e40| 75 6c 6c 45 76 65 6e 74 | 3b 0d 09 20 20 62 72 65 |ullEvent|;.. bre|
|00000e50| 61 6b 3b 0d 09 20 20 20 | 20 0d 09 63 61 73 65 20 |ak;.. | ..case |
|00000e60| 09 6b 46 6c 61 74 74 65 | 6e 4d 6f 76 69 65 3a 0d |.kFlatte|nMovie:.|
|00000e70| 09 20 20 47 65 74 44 49 | 74 65 6d 28 74 68 65 44 |. GetDI|tem(theD|
|00000e80| 69 61 6c 6f 67 2c 20 6b | 46 6c 61 74 74 65 6e 4d |ialog, k|FlattenM|
|00000e90| 6f 76 69 65 2c 20 26 69 | 74 65 6d 54 79 70 65 2c |ovie, &i|temType,|
|00000ea0| 20 26 64 49 74 65 6d 2c | 20 26 62 6f 78 29 3b 0d | &dItem,| &box);.|
|00000eb0| 09 20 20 69 66 20 28 69 | 74 65 6d 54 79 70 65 20 |. if (i|temType |
|00000ec0| 3d 3d 20 28 63 74 72 6c | 49 74 65 6d 2b 63 68 6b |== (ctrl|Item+chk|
|00000ed0| 43 74 72 6c 29 29 20 7b | 20 2f 2a 20 69 73 20 74 |Ctrl)) {| /* is t|
|00000ee0| 68 69 73 20 6f 75 72 20 | 69 74 65 6d 3f 20 2a 2f |his our |item? */|
|00000ef0| 0d 09 09 76 61 6c 75 65 | 20 3d 20 47 65 74 43 74 |...value| = GetCt|
|00000f00| 6c 56 61 6c 75 65 28 28 | 43 6f 6e 74 72 6f 6c 48 |lValue((|ControlH|
|00000f10| 61 6e 64 6c 65 29 64 49 | 74 65 6d 29 3b 09 2f 2a |andle)dI|tem);./*|
|00000f20| 20 67 65 74 20 63 75 72 | 72 65 6e 74 20 73 65 74 | get cur|rent set|
|00000f30| 74 69 6e 67 20 09 2a 2f | 0d 09 09 53 65 74 43 74 |ting .*/|...SetCt|
|00000f40| 6c 56 61 6c 75 65 28 28 | 43 6f 6e 74 72 6f 6c 48 |lValue((|ControlH|
|00000f50| 61 6e 64 6c 65 29 64 49 | 74 65 6d 2c 20 76 61 6c |andle)dI|tem, val|
|00000f60| 75 65 3f 30 3a 31 29 3b | 09 2f 2a 20 61 6e 64 20 |ue?0:1);|./* and |
|00000f70| 73 77 69 74 63 68 20 69 | 74 09 09 2a 2f 0d 09 20 |switch i|t..*/.. |
|00000f80| 20 7d 0d 09 20 20 72 65 | 74 75 72 6e 20 73 66 48 | }.. re|turn sfH|
|00000f90| 6f 6f 6b 4e 75 6c 6c 45 | 76 65 6e 74 3b 0d 09 20 |ookNullE|vent;.. |
|00000fa0| 20 62 72 65 61 6b 3b 0d | 09 63 61 73 65 20 73 66 | break;.|.case sf|
|00000fb0| 49 74 65 6d 4f 70 65 6e | 42 75 74 74 6f 6e 3a 0d |ItemOpen|Button:.|
|00000fc0| 09 20 20 47 65 74 44 49 | 74 65 6d 28 74 68 65 44 |. GetDI|tem(theD|
|00000fd0| 69 61 6c 6f 67 2c 20 6b | 46 6c 61 74 74 65 6e 4d |ialog, k|FlattenM|
|00000fe0| 6f 76 69 65 2c 20 26 69 | 74 65 6d 54 79 70 65 2c |ovie, &i|temType,|
|00000ff0| 20 26 64 49 74 65 6d 2c | 20 26 62 6f 78 29 3b 0d | &dItem,| &box);.|
|00001000| 09 20 20 69 66 20 28 69 | 74 65 6d 54 79 70 65 20 |. if (i|temType |
|00001010| 3d 3d 20 28 63 74 72 6c | 49 74 65 6d 2b 63 68 6b |== (ctrl|Item+chk|
|00001020| 43 74 72 6c 29 29 20 7b | 20 2f 2a 20 69 73 20 74 |Ctrl)) {| /* is t|
|00001030| 68 69 73 20 6f 75 72 20 | 69 74 65 6d 3f 20 2a 2f |his our |item? */|
|00001040| 0d 09 09 76 61 6c 75 65 | 20 3d 20 47 65 74 43 74 |...value| = GetCt|
|00001050| 6c 56 61 6c 75 65 28 28 | 43 6f 6e 74 72 6f 6c 48 |lValue((|ControlH|
|00001060| 61 6e 64 6c 65 29 64 49 | 74 65 6d 29 3b 09 2f 2a |andle)dI|tem);./*|
|00001070| 20 67 65 74 20 63 75 72 | 72 65 6e 74 20 73 65 74 | get cur|rent set|
|00001080| 74 69 6e 67 20 09 2a 2f | 0d 09 09 2a 28 6c 6f 6e |ting .*/|...*(lon|
|00001090| 67 20 2a 29 6d 79 44 61 | 74 61 20 3d 76 61 6c 75 |g *)myDa|ta =valu|
|000010a0| 65 3b 0d 09 20 20 7d 0d | 09 62 72 65 61 6b 3b 0d |e;.. }.|.break;.|
|000010b0| 09 64 65 66 61 75 6c 74 | 3a 20 0d 09 20 20 62 72 |.default|: .. br|
|000010c0| 65 61 6b 3b 0d 09 7d 0d | 09 72 65 74 75 72 6e 20 |eak;..}.|.return |
|000010d0| 69 74 65 6d 3b 20 2f 2a | 20 69 6e 20 61 6c 6c 20 |item; /*| in all |
|000010e0| 6f 74 68 65 72 20 63 61 | 73 65 73 20 72 65 74 75 |other ca|ses retu|
|000010f0| 72 6e 20 74 68 65 20 69 | 74 65 6d 20 74 6f 20 6c |rn the i|tem to l|
|00001100| 65 74 20 53 46 20 64 6f | 20 74 68 65 20 6e 6f 72 |et SF do| the nor|
|00001110| 6d 61 6c 20 70 72 6f 63 | 65 73 73 69 6e 67 20 2a |mal proc|essing *|
|00001120| 2f 0d 7d 0d 0d 42 6f 6f | 6c 65 61 6e 20 44 69 73 |/.}..Boo|lean Dis|
|00001130| 70 6c 61 79 50 75 74 46 | 69 6c 65 28 72 65 70 6c |playPutF|ile(repl|
|00001140| 79 29 0d 53 74 61 6e 64 | 61 72 64 46 69 6c 65 52 |y).Stand|ardFileR|
|00001150| 65 70 6c 79 20 2a 72 65 | 70 6c 79 3b 0d 7b 0d 09 |eply *re|ply;.{..|
|00001160| 53 74 72 32 35 35 09 09 | 70 72 6f 6d 70 74 3b 0d |Str255..|prompt;.|
|00001170| 09 50 6f 69 6e 74 09 09 | 77 68 65 72 65 20 3d 20 |.Point..|where = |
|00001180| 7b 2d 31 2c 20 2d 31 7d | 3b 0d 0d 09 47 65 74 49 |{-1, -1}|;...GetI|
|00001190| 6e 64 53 74 72 69 6e 67 | 28 70 72 6f 6d 70 74 2c |ndString|(prompt,|
|000011a0| 20 72 4d 69 73 63 53 74 | 72 69 6e 67 73 2c 20 73 | rMiscSt|rings, s|
|000011b0| 53 46 70 72 6f 6d 70 74 | 29 3b 0d 0d 09 43 75 73 |SFprompt|);...Cus|
|000011c0| 74 6f 6d 50 75 74 46 69 | 6c 65 28 70 72 6f 6d 70 |tomPutFi|le(promp|
|000011d0| 74 2c 20 72 65 70 6c 79 | 2d 3e 73 66 46 69 6c 65 |t, reply|->sfFile|
|000011e0| 2e 6e 61 6d 65 2c 20 72 | 65 70 6c 79 2c 20 72 43 |.name, r|eply, rC|
|000011f0| 75 73 74 6f 6d 50 75 74 | 2c 20 77 68 65 72 65 2c |ustomPut|, where,|
|00001200| 0d 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00001210| 4d 79 44 6c 6f 67 48 6f | 6f 6b 2c 20 6e 69 6c 2c |MyDlogHo|ok, nil,|
|00001220| 20 6e 69 6c 2c 20 6e 69 | 6c 2c 20 26 67 46 6c 61 | nil, ni|l, &gFla|
|00001230| 74 74 65 6e 4d 6f 76 69 | 65 73 29 3b 0d 0d 09 72 |ttenMovi|es);...r|
|00001240| 65 74 75 72 6e 28 72 65 | 70 6c 79 2d 3e 73 66 47 |eturn(re|ply->sfG|
|00001250| 6f 6f 64 29 3b 0d 7d 0d | 0d 76 6f 69 64 09 4f 75 |ood);.}.|.void.Ou|
|00001260| 74 6c 69 6e 65 44 69 61 | 6c 6f 67 49 74 65 6d 28 |tlineDia|logItem(|
|00001270| 44 69 61 6c 6f 67 50 74 | 72 20 64 6c 67 50 74 72 |DialogPt|r dlgPtr|
|00001280| 2c 20 73 68 6f 72 74 20 | 69 74 65 6d 29 0d 7b 0d |, short |item).{.|
|00001290| 09 73 68 6f 72 74 20 69 | 4b 69 6e 64 3b 0d 09 48 |.short i|Kind;..H|
|000012a0| 61 6e 64 6c 65 20 69 48 | 61 6e 64 6c 65 3b 0d 09 |andle iH|andle;..|
|000012b0| 52 65 63 74 20 69 52 65 | 63 74 3b 0d 0d 09 47 65 |Rect iRe|ct;...Ge|
|000012c0| 74 44 49 74 65 6d 20 28 | 64 6c 67 50 74 72 2c 20 |tDItem (|dlgPtr, |
|000012d0| 69 74 65 6d 2c 20 26 69 | 4b 69 6e 64 2c 20 26 69 |item, &i|Kind, &i|
|000012e0| 48 61 6e 64 6c 65 2c 20 | 26 69 52 65 63 74 29 3b |Handle, |&iRect);|
|000012f0| 0d 09 4f 75 74 6c 69 6e | 65 43 6f 6e 74 72 6f 6c |..Outlin|eControl|
|00001300| 28 28 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 29 |((Contro|lHandle)|
|00001310| 20 69 48 61 6e 64 6c 65 | 29 3b 0d 7d 0d 0d 76 6f | iHandle|);.}..vo|
|00001320| 69 64 09 4f 75 74 6c 69 | 6e 65 43 6f 6e 74 72 6f |id.Outli|neContro|
|00001330| 6c 28 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 20 |l(Contro|lHandle |
|00001340| 62 75 74 74 6f 6e 29 0d | 7b 0d 09 52 65 63 74 09 |button).|{..Rect.|
|00001350| 09 74 68 65 52 65 63 74 | 3b 0d 09 50 65 6e 53 74 |.theRect|;..PenSt|
|00001360| 61 74 65 09 63 75 72 50 | 65 6e 3b 0d 09 73 68 6f |ate.curP|en;..sho|
|00001370| 72 74 09 09 62 75 74 74 | 6f 6e 4f 76 61 6c 3b 0d |rt..butt|onOval;.|
|00001380| 0d 09 69 66 20 28 62 75 | 74 74 6f 6e 29 20 7b 0d |..if (bu|tton) {.|
|00001390| 09 09 53 65 74 50 6f 72 | 74 28 28 2a 62 75 74 74 |..SetPor|t((*butt|
|000013a0| 6f 6e 29 2d 3e 63 6f 6e | 74 72 6c 4f 77 6e 65 72 |on)->con|trlOwner|
|000013b0| 29 3b 0d 09 09 47 65 74 | 50 65 6e 53 74 61 74 65 |);...Get|PenState|
|000013c0| 28 26 63 75 72 50 65 6e | 29 3b 0d 09 09 50 65 6e |(&curPen|);...Pen|
|000013d0| 4e 6f 72 6d 61 6c 28 29 | 3b 0d 09 09 74 68 65 52 |Normal()|;...theR|
|000013e0| 65 63 74 20 3d 20 28 2a | 62 75 74 74 6f 6e 29 2d |ect = (*|button)-|
|000013f0| 3e 63 6f 6e 74 72 6c 52 | 65 63 74 3b 0d 09 09 49 |>contrlR|ect;...I|
|00001400| 6e 73 65 74 52 65 63 74 | 28 26 74 68 65 52 65 63 |nsetRect|(&theRec|
|00001410| 74 2c 20 6b 42 75 74 74 | 6f 6e 46 72 61 6d 65 49 |t, kButt|onFrameI|
|00001420| 6e 73 65 74 2c 20 6b 42 | 75 74 74 6f 6e 46 72 61 |nset, kB|uttonFra|
|00001430| 6d 65 49 6e 73 65 74 29 | 3b 0d 09 09 62 75 74 74 |meInset)|;...butt|
|00001440| 6f 6e 4f 76 61 6c 20 3d | 20 28 74 68 65 52 65 63 |onOval =| (theRec|
|00001450| 74 2e 62 6f 74 74 6f 6d | 20 2d 20 74 68 65 52 65 |t.bottom| - theRe|
|00001460| 63 74 2e 74 6f 70 29 20 | 2f 20 32 20 2b 20 32 3b |ct.top) |/ 2 + 2;|
|00001470| 0d 0d 09 09 50 65 6e 50 | 61 74 28 28 2a 62 75 74 |....PenP|at((*but|
|00001480| 74 6f 6e 29 2d 3e 63 6f | 6e 74 72 6c 48 69 6c 69 |ton)->co|ntrlHili|
|00001490| 74 65 20 3d 3d 20 6b 43 | 6e 74 6c 41 63 74 69 76 |te == kC|ntlActiv|
|000014a0| 61 74 65 20 3f 20 26 28 | 71 64 2e 62 6c 61 63 6b |ate ? &(|qd.black|
|000014b0| 29 20 3a 20 26 28 71 64 | 2e 67 72 61 79 29 29 3b |) : &(qd|.gray));|
|000014c0| 0d 0d 09 09 50 65 6e 53 | 69 7a 65 28 6b 42 75 74 |....PenS|ize(kBut|
|000014d0| 74 6f 6e 46 72 61 6d 65 | 53 69 7a 65 2c 20 6b 42 |tonFrame|Size, kB|
|000014e0| 75 74 74 6f 6e 46 72 61 | 6d 65 53 69 7a 65 29 3b |uttonFra|meSize);|
|000014f0| 0d 09 09 46 72 61 6d 65 | 52 6f 75 6e 64 52 65 63 |...Frame|RoundRec|
|00001500| 74 28 26 74 68 65 52 65 | 63 74 2c 20 62 75 74 74 |t(&theRe|ct, butt|
|00001510| 6f 6e 4f 76 61 6c 2c 20 | 62 75 74 74 6f 6e 4f 76 |onOval, |buttonOv|
|00001520| 61 6c 29 3b 0d 09 09 53 | 65 74 50 65 6e 53 74 61 |al);...S|etPenSta|
|00001530| 74 65 28 26 63 75 72 50 | 65 6e 29 3b 0d 09 7d 0d |te(&curP|en);..}.|
|00001540| 7d 0d 0d 0d 70 61 73 63 | 61 6c 20 42 6f 6f 6c 65 |}...pasc|al Boole|
|00001550| 61 6e 09 6b 65 79 45 71 | 75 69 76 46 69 6c 74 65 |an.keyEq|uivFilte|
|00001560| 72 28 44 69 61 6c 6f 67 | 50 74 72 20 64 6c 67 2c |r(Dialog|Ptr dlg,|
|00001570| 20 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 65 76 | EventRe|cord *ev|
|00001580| 65 6e 74 2c 20 73 68 6f | 72 74 20 2a 69 74 65 6d |ent, sho|rt *item|
|00001590| 29 0d 7b 0d 09 73 68 6f | 72 74 09 69 74 65 6d 54 |).{..sho|rt.itemT|
|000015a0| 79 70 65 3b 0d 09 48 61 | 6e 64 6c 65 09 69 74 65 |ype;..Ha|ndle.ite|
|000015b0| 6d 48 6e 64 6c 3b 0d 09 | 52 65 63 74 09 69 74 65 |mHndl;..|Rect.ite|
|000015c0| 6d 52 65 63 74 3b 0d 09 | 53 74 72 32 35 35 09 69 |mRect;..|Str255.i|
|000015d0| 74 65 6d 54 65 78 74 3b | 0d 09 73 68 6f 72 74 09 |temText;|..short.|
|000015e0| 69 2c 20 74 68 65 43 68 | 72 2c 20 74 68 65 4d 6f |i, theCh|r, theMo|
|000015f0| 64 2c 20 65 71 75 69 76 | 43 68 72 2c 20 6d 6f 64 |d, equiv|Chr, mod|
|00001600| 4d 61 73 6b 2c 20 6d 6f | 64 56 61 6c 2c 20 69 74 |Mask, mo|dVal, it|
|00001610| 65 6d 4e 75 6d 3b 0d 09 | 6c 6f 6e 67 09 74 69 63 |emNum;..|long.tic|
|00001620| 6b 3b 0d 0d 09 69 66 20 | 28 65 76 65 6e 74 2d 3e |k;...if |(event->|
|00001630| 77 68 61 74 20 3d 3d 20 | 75 70 64 61 74 65 45 76 |what == |updateEv|
|00001640| 74 29 20 7b 0d 09 09 69 | 66 20 28 64 6c 67 20 3d |t) {...i|f (dlg =|
|00001650| 3d 20 28 44 69 61 6c 6f | 67 50 74 72 29 65 76 65 |= (Dialo|gPtr)eve|
|00001660| 6e 74 2d 3e 6d 65 73 73 | 61 67 65 29 20 4f 75 74 |nt->mess|age) Out|
|00001670| 6c 69 6e 65 44 69 61 6c | 6f 67 49 74 65 6d 28 64 |lineDial|ogItem(d|
|00001680| 6c 67 2c 20 31 29 3b 0d | 09 09 72 65 74 75 72 6e |lg, 1);.|..return|
|00001690| 28 66 61 6c 73 65 29 3b | 0d 09 7d 0d 0d 09 69 66 |(false);|..}...if|
|000016a0| 20 28 65 76 65 6e 74 2d | 3e 77 68 61 74 20 21 3d | (event-|>what !=|
|000016b0| 20 6b 65 79 44 6f 77 6e | 29 20 72 65 74 75 72 6e | keyDown|) return|
|000016c0| 28 66 61 6c 73 65 29 3b | 0d 0d 09 69 74 65 6d 4e |(false);|...itemN|
|000016d0| 75 6d 20 3d 20 30 3b 0d | 0d 09 74 68 65 43 68 72 |um = 0;.|..theChr|
|000016e0| 20 3d 20 65 76 65 6e 74 | 2d 3e 6d 65 73 73 61 67 | = event|->messag|
|000016f0| 65 20 20 20 26 20 63 68 | 61 72 43 6f 64 65 4d 61 |e & ch|arCodeMa|
|00001700| 73 6b 3b 0d 09 74 68 65 | 4d 6f 64 20 3d 20 65 76 |sk;..the|Mod = ev|
|00001710| 65 6e 74 2d 3e 6d 6f 64 | 69 66 69 65 72 73 20 26 |ent->mod|ifiers &|
|00001720| 20 6b 65 79 43 6f 64 65 | 4d 61 73 6b 3b 0d 0d 09 | keyCode|Mask;...|
|00001730| 69 66 20 28 28 74 68 65 | 43 68 72 20 3d 3d 20 30 |if ((the|Chr == 0|
|00001740| 78 30 44 29 20 7c 7c 20 | 28 74 68 65 43 68 72 20 |x0D) || |(theChr |
|00001750| 3d 3d 20 30 78 30 33 29 | 29 20 7b 09 09 2f 2a 20 |== 0x03)|) {../* |
|00001760| 49 66 20 72 65 74 75 72 | 6e 20 6f 72 20 65 6e 74 |If retur|n or ent|
|00001770| 65 72 2e 2e 2e 20 2a 2f | 0d 09 09 69 66 20 28 21 |er... */|...if (!|
|00001780| 28 74 68 65 4d 6f 64 20 | 26 20 28 63 6d 64 4b 65 |(theMod |& (cmdKe|
|00001790| 79 20 2b 20 6f 70 74 69 | 6f 6e 4b 65 79 20 2b 20 |y + opti|onKey + |
|000017a0| 63 6f 6e 74 72 6f 6c 4b | 65 79 29 29 29 20 69 74 |controlK|ey))) it|
|000017b0| 65 6d 4e 75 6d 20 3d 20 | 31 3b 0d 09 7d 09 09 0d |emNum = |1;..}...|
|000017c0| 09 65 6c 73 65 20 7b 0d | 0d 09 09 47 65 74 44 49 |.else {.|...GetDI|
|000017d0| 74 65 6d 28 64 6c 67 2c | 20 32 2c 20 26 69 74 65 |tem(dlg,| 2, &ite|
|000017e0| 6d 54 79 70 65 2c 20 26 | 69 74 65 6d 48 6e 64 6c |mType, &|itemHndl|
|000017f0| 2c 20 26 69 74 65 6d 52 | 65 63 74 29 3b 0d 09 09 |, &itemR|ect);...|
|00001800| 47 65 74 49 54 65 78 74 | 28 69 74 65 6d 48 6e 64 |GetIText|(itemHnd|
|00001810| 6c 2c 20 69 74 65 6d 54 | 65 78 74 29 3b 0d 0d 09 |l, itemT|ext);...|
|00001820| 09 66 6f 72 20 28 69 20 | 3d 20 31 3b 20 69 20 3c |.for (i |= 1; i <|
|00001830| 3d 20 2a 69 74 65 6d 54 | 65 78 74 3b 20 69 20 2b |= *itemT|ext; i +|
|00001840| 3d 20 39 29 20 7b 0d 09 | 09 09 65 71 75 69 76 43 |= 9) {..|..equivC|
|00001850| 68 72 20 3d 20 47 65 74 | 48 65 78 42 79 74 65 28 |hr = Get|HexByte(|
|00001860| 69 74 65 6d 54 65 78 74 | 20 2b 20 69 29 3b 0d 09 |itemText| + i);..|
|00001870| 09 09 6d 6f 64 4d 61 73 | 6b 20 20 3d 20 47 65 74 |..modMas|k = Get|
|00001880| 48 65 78 42 79 74 65 28 | 69 74 65 6d 54 65 78 74 |HexByte(|itemText|
|00001890| 20 2b 20 69 20 2b 20 32 | 29 20 3c 3c 20 38 3b 0d | + i + 2|) << 8;.|
|000018a0| 09 09 09 6d 6f 64 56 61 | 6c 20 20 20 3d 20 47 65 |...modVa|l = Ge|
|000018b0| 74 48 65 78 42 79 74 65 | 28 69 74 65 6d 54 65 78 |tHexByte|(itemTex|
|000018c0| 74 20 2b 20 69 20 2b 20 | 34 29 20 3c 3c 20 38 3b |t + i + |4) << 8;|
|000018d0| 0d 09 09 09 69 74 65 6d | 4e 75 6d 20 20 3d 20 47 |....item|Num = G|
|000018e0| 65 74 48 65 78 42 79 74 | 65 28 69 74 65 6d 54 65 |etHexByt|e(itemTe|
|000018f0| 78 74 20 2b 20 69 20 2b | 20 36 29 3b 0d 09 09 09 |xt + i +| 6);....|
|00001900| 69 66 20 28 74 68 65 43 | 68 72 20 3d 3d 20 65 71 |if (theC|hr == eq|
|00001910| 75 69 76 43 68 72 29 0d | 09 09 09 09 69 66 20 28 |uivChr).|....if (|
|00001920| 28 74 68 65 4d 6f 64 20 | 26 20 6d 6f 64 4d 61 73 |(theMod |& modMas|
|00001930| 6b 29 20 3d 3d 20 6d 6f | 64 56 61 6c 29 20 62 72 |k) == mo|dVal) br|
|00001940| 65 61 6b 3b 0d 09 09 09 | 69 74 65 6d 4e 75 6d 20 |eak;....|itemNum |
|00001950| 3d 20 30 3b 0d 09 09 7d | 0d 09 7d 0d 0d 09 69 66 |= 0;...}|..}...if|
|00001960| 20 28 69 74 65 6d 4e 75 | 6d 29 20 7b 0d 09 09 47 | (itemNu|m) {...G|
|00001970| 65 74 44 49 74 65 6d 28 | 64 6c 67 2c 20 69 74 65 |etDItem(|dlg, ite|
|00001980| 6d 4e 75 6d 2c 20 26 69 | 74 65 6d 54 79 70 65 2c |mNum, &i|temType,|
|00001990| 20 26 69 74 65 6d 48 6e | 64 6c 2c 20 26 69 74 65 | &itemHn|dl, &ite|
|000019a0| 6d 52 65 63 74 29 3b 0d | 09 09 48 69 6c 69 74 65 |mRect);.|..Hilite|
|000019b0| 43 6f 6e 74 72 6f 6c 28 | 28 43 6f 6e 74 72 6f 6c |Control(|(Control|
|000019c0| 48 61 6e 64 6c 65 29 69 | 74 65 6d 48 6e 64 6c 2c |Handle)i|temHndl,|
|000019d0| 20 31 29 3b 0d 09 09 74 | 69 63 6b 20 3d 20 54 69 | 1);...t|ick = Ti|
|000019e0| 63 6b 43 6f 75 6e 74 28 | 29 3b 0d 09 09 77 68 69 |ckCount(|);...whi|
|000019f0| 6c 65 20 28 54 69 63 6b | 43 6f 75 6e 74 28 29 20 |le (Tick|Count() |
|00001a00| 3c 20 74 69 63 6b 20 2b | 20 31 30 29 3b 0d 09 09 |< tick +| 10);...|
|00001a10| 48 69 6c 69 74 65 43 6f | 6e 74 72 6f 6c 28 28 43 |HiliteCo|ntrol((C|
|00001a20| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 29 69 74 65 |ontrolHa|ndle)ite|
|00001a30| 6d 48 6e 64 6c 2c 20 30 | 29 3b 0d 09 09 2a 69 74 |mHndl, 0|);...*it|
|00001a40| 65 6d 20 3d 20 69 74 65 | 6d 4e 75 6d 3b 0d 09 09 |em = ite|mNum;...|
|00001a50| 72 65 74 75 72 6e 28 74 | 72 75 65 29 3b 0d 09 7d |return(t|rue);..}|
|00001a60| 0d 0d 09 72 65 74 75 72 | 6e 28 66 61 6c 73 65 29 |...retur|n(false)|
|00001a70| 3b 0d 7d 0d 0d 52 65 63 | 74 09 47 65 74 57 69 6e |;.}..Rec|t.GetWin|
|00001a80| 64 6f 77 44 65 76 69 63 | 65 52 65 63 74 4e 4d 42 |dowDevic|eRectNMB|
|00001a90| 28 57 69 6e 64 6f 77 50 | 74 72 20 77 69 6e 64 6f |(WindowP|tr windo|
|00001aa0| 77 29 0d 7b 0d 09 52 65 | 63 74 09 09 64 65 76 69 |w).{..Re|ct..devi|
|00001ab0| 63 65 52 65 63 74 2c 20 | 74 65 6d 70 52 65 63 74 |ceRect, |tempRect|
|00001ac0| 3b 0d 0d 09 64 65 76 69 | 63 65 52 65 63 74 20 3d |;...devi|ceRect =|
|00001ad0| 20 47 65 74 57 69 6e 64 | 6f 77 44 65 76 69 63 65 | GetWind|owDevice|
|00001ae0| 52 65 63 74 28 77 69 6e | 64 6f 77 29 3b 0d 09 74 |Rect(win|dow);..t|
|00001af0| 65 6d 70 52 65 63 74 20 | 3d 20 47 65 74 4d 61 69 |empRect |= GetMai|
|00001b00| 6e 53 63 72 65 65 6e 52 | 65 63 74 28 29 3b 0d 09 |nScreenR|ect();..|
|00001b10| 69 66 20 28 45 71 75 61 | 6c 52 65 63 74 28 26 64 |if (Equa|lRect(&d|
|00001b20| 65 76 69 63 65 52 65 63 | 74 2c 20 26 74 65 6d 70 |eviceRec|t, &temp|
|00001b30| 52 65 63 74 29 29 20 64 | 65 76 69 63 65 52 65 63 |Rect)) d|eviceRec|
|00001b40| 74 2e 74 6f 70 20 2b 3d | 20 47 65 74 4d 42 61 72 |t.top +=| GetMBar|
|00001b50| 48 65 69 67 68 74 28 29 | 3b 0d 0d 09 72 65 74 75 |Height()|;...retu|
|00001b60| 72 6e 28 64 65 76 69 63 | 65 52 65 63 74 29 3b 0d |rn(devic|eRect);.|
|00001b70| 7d 0d 0d 52 65 63 74 09 | 43 65 6e 74 65 72 57 69 |}..Rect.|CenterWi|
|00001b80| 6e 64 6f 77 28 57 69 6e | 64 6f 77 50 74 72 20 77 |ndow(Win|dowPtr w|
|00001b90| 69 6e 64 6f 77 2c 20 57 | 69 6e 64 6f 77 50 74 72 |indow, W|indowPtr|
|00001ba0| 20 72 65 6c 61 74 65 64 | 57 69 6e 64 6f 77 29 0d | related|Window).|
|00001bb0| 7b 0d 09 57 69 6e 64 6f | 77 50 74 72 09 77 68 69 |{..Windo|wPtr.whi|
|00001bc0| 63 68 44 65 76 69 63 65 | 3b 0d 09 52 65 63 74 09 |chDevice|;..Rect.|
|00001bd0| 09 64 65 76 69 63 65 52 | 65 63 74 2c 20 6f 6c 64 |.deviceR|ect, old|
|00001be0| 57 69 6e 64 6f 77 52 65 | 63 74 2c 20 6e 65 77 57 |WindowRe|ct, newW|
|00001bf0| 69 6e 64 6f 77 52 65 63 | 74 2c 20 63 6f 6e 74 65 |indowRec|t, conte|
|00001c00| 6e 74 52 65 63 74 3b 0d | 0d 09 69 66 20 28 21 28 |ntRect;.|..if (!(|
|00001c10| 77 68 69 63 68 44 65 76 | 69 63 65 20 3d 20 72 65 |whichDev|ice = re|
|00001c20| 6c 61 74 65 64 57 69 6e | 64 6f 77 29 29 20 77 68 |latedWin|dow)) wh|
|00001c30| 69 63 68 44 65 76 69 63 | 65 20 3d 20 77 69 6e 64 |ichDevic|e = wind|
|00001c40| 6f 77 3b 0d 09 09 2f 2a | 20 49 66 20 77 65 20 68 |ow;.../*| If we h|
|00001c50| 61 76 65 20 61 20 77 69 | 6e 64 6f 77 20 74 6f 20 |ave a wi|ndow to |
|00001c60| 63 65 6e 74 65 72 20 61 | 67 61 69 6e 73 74 2c 20 |center a|gainst, |
|00001c70| 75 73 65 20 74 68 65 20 | 64 65 76 69 63 65 20 66 |use the |device f|
|00001c80| 6f 72 20 74 68 61 74 20 | 77 69 6e 64 6f 77 2c 0d |or that |window,.|
|00001c90| 09 09 2a 2a 20 65 6c 73 | 65 20 75 73 65 20 74 68 |..** els|e use th|
|00001ca0| 65 20 64 65 76 69 63 65 | 20 66 6f 72 20 74 68 65 |e device| for the|
|00001cb0| 20 77 69 6e 64 6f 77 20 | 74 68 61 74 20 69 73 20 | window |that is |
|00001cc0| 67 65 74 74 69 6e 67 20 | 63 65 6e 74 65 72 65 64 |getting |centered|
|00001cd0| 2e 20 2a 2f 0d 0d 09 64 | 65 76 69 63 65 52 65 63 |. */...d|eviceRec|
|00001ce0| 74 20 3d 20 47 65 74 57 | 69 6e 64 6f 77 44 65 76 |t = GetW|indowDev|
|00001cf0| 69 63 65 52 65 63 74 4e | 4d 42 28 77 68 69 63 68 |iceRectN|MB(which|
|00001d00| 44 65 76 69 63 65 29 3b | 0d 09 09 2f 2a 20 57 65 |Device);|.../* We|
|00001d10| 20 6e 6f 77 20 68 61 76 | 65 20 74 68 65 20 72 65 | now hav|e the re|
|00001d20| 63 74 61 6e 67 6c 65 20 | 6f 66 20 74 68 65 20 64 |ctangle |of the d|
|00001d30| 65 76 69 63 65 20 77 65 | 20 77 61 6e 74 20 74 6f |evice we| want to|
|00001d40| 20 63 65 6e 74 65 72 20 | 77 69 74 68 69 6e 2e 20 | center |within. |
|00001d50| 2a 2f 0d 0d 09 6f 6c 64 | 57 69 6e 64 6f 77 52 65 |*/...old|WindowRe|
|00001d60| 63 74 20 3d 20 6e 65 77 | 57 69 6e 64 6f 77 52 65 |ct = new|WindowRe|
|00001d70| 63 74 20 3d 20 47 65 74 | 57 69 6e 64 6f 77 53 74 |ct = Get|WindowSt|
|00001d80| 72 75 63 74 75 72 65 52 | 65 63 74 28 77 69 6e 64 |ructureR|ect(wind|
|00001d90| 6f 77 29 3b 0d 0d 09 50 | 6f 73 69 74 69 6f 6e 52 |ow);...P|ositionR|
|00001da0| 65 63 74 49 6e 52 65 63 | 74 28 64 65 76 69 63 65 |ectInRec|t(device|
|00001db0| 52 65 63 74 2c 20 26 6e | 65 77 57 69 6e 64 6f 77 |Rect, &n|ewWindow|
|00001dc0| 52 65 63 74 2c 20 46 69 | 78 52 61 74 69 6f 20 28 |Rect, Fi|xRatio (|
|00001dd0| 31 2c 20 32 29 2c 0d 09 | 09 09 09 09 20 20 20 46 |1, 2),..|.... F|
|00001de0| 69 78 52 61 74 69 6f 20 | 28 31 2c 20 33 29 29 3b |ixRatio |(1, 3));|
|00001df0| 0d 09 09 2f 2a 20 46 69 | 67 75 72 65 20 6f 75 74 |.../* Fi|gure out|
|00001e00| 20 74 68 65 20 6e 65 77 | 20 77 69 6e 64 6f 77 20 | the new| window |
|00001e10| 73 74 72 75 63 52 65 63 | 74 20 73 6f 20 77 65 20 |strucRec|t so we |
|00001e20| 63 61 6e 20 63 6f 6d 70 | 61 72 65 20 69 74 20 61 |can comp|are it a|
|00001e30| 67 61 69 6e 73 74 0d 09 | 09 2a 2a 20 74 68 65 20 |gainst..|.** the |
|00001e40| 6f 6c 64 20 73 74 72 75 | 63 52 65 63 74 2e 20 20 |old stru|cRect. |
|00001e50| 54 68 69 73 20 77 69 6c | 6c 20 74 65 6c 6c 20 75 |This wil|l tell u|
|00001e60| 73 20 68 6f 77 20 6d 75 | 63 68 20 74 6f 20 6d 6f |s how mu|ch to mo|
|00001e70| 76 65 20 74 68 65 20 77 | 69 6e 64 6f 77 2e 20 2a |ve the w|indow. *|
|00001e80| 2f 0d 0d 09 63 6f 6e 74 | 65 6e 74 52 65 63 74 20 |/...cont|entRect |
|00001e90| 3d 20 47 65 74 57 69 6e | 64 6f 77 43 6f 6e 74 65 |= GetWin|dowConte|
|00001ea0| 6e 74 52 65 63 74 28 77 | 69 6e 64 6f 77 29 3b 0d |ntRect(w|indow);.|
|00001eb0| 09 09 2f 2a 20 47 65 74 | 20 77 68 65 72 65 20 74 |../* Get| where t|
|00001ec0| 68 65 20 77 69 6e 64 6f | 77 20 69 73 20 6e 6f 77 |he windo|w is now|
|00001ed0| 2e 20 2a 2f 0d 0d 09 4f | 66 66 73 65 74 52 65 63 |. */...O|ffsetRec|
|00001ee0| 74 28 26 63 6f 6e 74 65 | 6e 74 52 65 63 74 2c 20 |t(&conte|ntRect, |
|00001ef0| 6e 65 77 57 69 6e 64 6f | 77 52 65 63 74 2e 6c 65 |newWindo|wRect.le|
|00001f00| 66 74 20 2d 20 6f 6c 64 | 57 69 6e 64 6f 77 52 65 |ft - old|WindowRe|
|00001f10| 63 74 2e 6c 65 66 74 2c | 0d 09 09 09 09 09 09 09 |ct.left,|........|
|00001f20| 6e 65 77 57 69 6e 64 6f | 77 52 65 63 74 2e 74 6f |newWindo|wRect.to|
|00001f30| 70 20 20 2d 20 6f 6c 64 | 57 69 6e 64 6f 77 52 65 |p - old|WindowRe|
|00001f40| 63 74 2e 74 6f 70 29 3b | 0d 09 09 2f 2a 20 43 61 |ct.top);|.../* Ca|
|00001f50| 6c 63 75 6c 61 74 65 20 | 74 68 65 20 6e 65 77 20 |lculate |the new |
|00001f60| 63 6f 6e 74 65 6e 74 20 | 72 65 63 74 2e 20 2a 2f |content |rect. */|
|00001f70| 0d 0d 09 4d 6f 76 65 57 | 69 6e 64 6f 77 28 77 69 |...MoveW|indow(wi|
|00001f80| 6e 64 6f 77 2c 20 63 6f | 6e 74 65 6e 74 52 65 63 |ndow, co|ntentRec|
|00001f90| 74 2e 6c 65 66 74 2c 20 | 63 6f 6e 74 65 6e 74 52 |t.left, |contentR|
|00001fa0| 65 63 74 2e 74 6f 70 2c | 20 66 61 6c 73 65 29 3b |ect.top,| false);|
|00001fb0| 0d 09 09 2f 2a 20 4d 6f | 76 65 20 74 68 65 20 77 |.../* Mo|ve the w|
|00001fc0| 69 6e 64 6f 77 20 74 6f | 20 74 68 65 20 6e 65 77 |indow to| the new|
|00001fd0| 20 6c 6f 63 61 74 69 6f | 6e 2e 20 2a 2f 0d 0d 09 | locatio|n. */...|
|00001fe0| 72 65 74 75 72 6e 28 63 | 6f 6e 74 65 6e 74 52 65 |return(c|ontentRe|
|00001ff0| 63 74 29 3b 0d 7d 0d 0d | 47 44 48 61 6e 64 6c 65 |ct);.}..|GDHandle|
|00002000| 09 47 65 74 52 65 63 74 | 44 65 76 69 63 65 28 52 |.GetRect|Device(R|
|00002010| 65 63 74 20 67 6c 6f 62 | 61 6c 52 65 63 74 29 0d |ect glob|alRect).|
|00002020| 7b 0d 09 6c 6f 6e 67 09 | 09 61 72 65 61 3b 0d 09 |{..long.|.area;..|
|00002030| 6c 6f 6e 67 09 09 6d 61 | 78 41 72 65 61 3b 0d 09 |long..ma|xArea;..|
|00002040| 47 44 48 61 6e 64 6c 65 | 09 64 65 76 69 63 65 3b |GDHandle|.device;|
|00002050| 0d 09 47 44 48 61 6e 64 | 6c 65 09 64 65 76 69 63 |..GDHand|le.devic|
|00002060| 65 54 6f 52 65 74 75 72 | 6e 3b 0d 09 52 65 63 74 |eToRetur|n;..Rect|
|00002070| 09 09 69 6e 74 65 72 73 | 65 63 74 69 6f 6e 3b 0d |..inters|ection;.|
|00002080| 0d 09 64 65 76 69 63 65 | 54 6f 52 65 74 75 72 6e |..device|ToReturn|
|00002090| 20 3d 20 47 65 74 4d 61 | 69 6e 44 65 76 69 63 65 | = GetMa|inDevice|
|000020a0| 28 29 3b 09 09 09 2f 2a | 20 55 73 65 20 61 73 20 |();.../*| Use as |
|000020b0| 64 65 66 61 75 6c 74 20 | 63 68 6f 69 63 65 2e 20 |default |choice. |
|000020c0| 2a 2f 0d 09 6d 61 78 41 | 72 65 61 20 3d 20 30 3b |*/..maxA|rea = 0;|
|000020d0| 0d 0d 09 66 6f 72 20 28 | 64 65 76 69 63 65 20 3d |...for (|device =|
|000020e0| 20 47 65 74 44 65 76 69 | 63 65 4c 69 73 74 28 29 | GetDevi|ceList()|
|000020f0| 3b 20 64 65 76 69 63 65 | 3b 20 64 65 76 69 63 65 |; device|; device|
|00002100| 20 3d 20 47 65 74 4e 65 | 78 74 44 65 76 69 63 65 | = GetNe|xtDevice|
|00002110| 28 64 65 76 69 63 65 29 | 29 20 7b 0d 09 09 69 66 |(device)|) {...if|
|00002120| 20 28 54 65 73 74 44 65 | 76 69 63 65 41 74 74 72 | (TestDe|viceAttr|
|00002130| 69 62 75 74 65 28 64 65 | 76 69 63 65 2c 20 73 63 |ibute(de|vice, sc|
|00002140| 72 65 65 6e 44 65 76 69 | 63 65 29 0d 09 09 20 20 |reenDevi|ce)... |
|00002150| 26 26 20 54 65 73 74 44 | 65 76 69 63 65 41 74 74 |&& TestD|eviceAtt|
|00002160| 72 69 62 75 74 65 28 64 | 65 76 69 63 65 2c 20 73 |ribute(d|evice, s|
|00002170| 63 72 65 65 6e 41 63 74 | 69 76 65 29 0d 09 09 20 |creenAct|ive)... |
|00002180| 20 26 26 20 53 65 63 74 | 52 65 63 74 28 26 67 6c | && Sect|Rect(&gl|
|00002190| 6f 62 61 6c 52 65 63 74 | 2c 20 26 28 28 2a 64 65 |obalRect|, &((*de|
|000021a0| 76 69 63 65 29 2d 3e 67 | 64 52 65 63 74 29 2c 20 |vice)->g|dRect), |
|000021b0| 26 69 6e 74 65 72 73 65 | 63 74 69 6f 6e 29 29 20 |&interse|ction)) |
|000021c0| 7b 0d 09 09 09 61 72 65 | 61 20 3d 20 28 69 6e 74 |{....are|a = (int|
|000021d0| 65 72 73 65 63 74 69 6f | 6e 2e 72 69 67 68 74 20 |ersectio|n.right |
|000021e0| 2d 20 69 6e 74 65 72 73 | 65 63 74 69 6f 6e 2e 6c |- inters|ection.l|
|000021f0| 65 66 74 29 20 2a 0d 09 | 09 09 09 20 20 20 28 69 |eft) *..|... (i|
|00002200| 6e 74 65 72 73 65 63 74 | 69 6f 6e 2e 62 6f 74 74 |ntersect|ion.bott|
|00002210| 6f 6d 20 2d 20 69 6e 74 | 65 72 73 65 63 74 69 6f |om - int|ersectio|
|00002220| 6e 2e 74 6f 70 29 3b 0d | 09 09 09 69 66 20 28 61 |n.top);.|...if (a|
|00002230| 72 65 61 20 3e 20 6d 61 | 78 41 72 65 61 29 20 7b |rea > ma|xArea) {|
|00002240| 0d 09 09 09 09 64 65 76 | 69 63 65 54 6f 52 65 74 |.....dev|iceToRet|
|00002250| 75 72 6e 20 3d 20 64 65 | 76 69 63 65 3b 0d 09 09 |urn = de|vice;...|
|00002260| 09 09 6d 61 78 41 72 65 | 61 20 3d 20 61 72 65 61 |..maxAre|a = area|
|00002270| 3b 0d 09 09 09 7d 0d 09 | 09 7d 0d 09 7d 0d 09 72 |;....}..|.}..}..r|
|00002280| 65 74 75 72 6e 28 64 65 | 76 69 63 65 54 6f 52 65 |eturn(de|viceToRe|
|00002290| 74 75 72 6e 29 3b 0d 7d | 0d 0d 52 65 63 74 09 47 |turn);.}|..Rect.G|
|000022a0| 65 74 57 69 6e 64 6f 77 | 44 65 76 69 63 65 52 65 |etWindow|DeviceRe|
|000022b0| 63 74 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |ct(Windo|wPtr win|
|000022c0| 64 6f 77 29 0d 7b 0d 23 | 70 72 61 67 6d 61 20 75 |dow).{.#|pragma u|
|000022d0| 6e 75 73 65 64 20 28 77 | 69 6e 64 6f 77 29 0d 0d |nused (w|indow)..|
|000022e0| 09 72 65 74 75 72 6e 28 | 47 65 74 4d 61 69 6e 53 |.return(|GetMainS|
|000022f0| 63 72 65 65 6e 52 65 63 | 74 28 29 29 3b 0d 7d 0d |creenRec|t());.}.|
|00002300| 0d 52 65 63 74 09 47 65 | 74 4d 61 69 6e 53 63 72 |.Rect.Ge|tMainScr|
|00002310| 65 65 6e 52 65 63 74 28 | 76 6f 69 64 29 0d 7b 0d |eenRect(|void).{.|
|00002320| 09 47 44 48 61 6e 64 6c | 65 09 6d 61 69 6e 44 65 |.GDHandl|e.mainDe|
|00002330| 76 69 63 65 3b 0d 0d 09 | 09 6d 61 69 6e 44 65 76 |vice;...|.mainDev|
|00002340| 69 63 65 20 3d 20 47 65 | 74 4d 61 69 6e 44 65 76 |ice = Ge|tMainDev|
|00002350| 69 63 65 28 29 3b 0d 09 | 09 72 65 74 75 72 6e 28 |ice();..|.return(|
|00002360| 28 2a 6d 61 69 6e 44 65 | 76 69 63 65 29 2d 3e 67 |(*mainDe|vice)->g|
|00002370| 64 52 65 63 74 29 3b 0d | 7d 0d 0d 73 68 6f 72 74 |dRect);.|}..short|
|00002380| 09 47 65 74 48 65 78 42 | 79 74 65 28 63 68 61 72 |.GetHexB|yte(char|
|00002390| 20 2a 63 70 74 72 29 0d | 7b 0d 09 73 68 6f 72 74 | *cptr).|{..short|
|000023a0| 09 76 61 6c 2c 20 69 2c | 20 63 68 72 3b 0d 0d 09 |.val, i,| chr;...|
|000023b0| 66 6f 72 20 28 76 61 6c | 20 3d 20 30 2c 20 69 20 |for (val| = 0, i |
|000023c0| 3d 20 30 3b 20 69 20 3c | 20 32 3b 20 2b 2b 69 29 |= 0; i <| 2; ++i)|
|000023d0| 20 7b 0d 09 09 63 68 72 | 20 3d 20 63 70 74 72 5b | {...chr| = cptr[|
|000023e0| 69 5d 3b 0d 09 09 69 66 | 20 28 63 68 72 20 3d 3d |i];...if| (chr ==|
|000023f0| 20 27 3d 27 29 20 72 65 | 74 75 72 6e 28 63 70 74 | '=') re|turn(cpt|
|00002400| 72 5b 2b 2b 69 5d 29 3b | 0d 09 09 69 66 20 28 63 |r[++i]);|...if (c|
|00002410| 68 72 20 3e 20 27 46 27 | 29 20 63 68 72 20 2d 3d |hr > 'F'|) chr -=|
|00002420| 20 30 78 32 30 3b 0d 09 | 09 69 66 20 28 63 68 72 | 0x20;..|.if (chr|
|00002430| 20 3e 20 27 39 27 29 20 | 63 68 72 20 2d 3d 20 28 | > '9') |chr -= (|
|00002440| 27 41 27 20 2d 20 27 39 | 27 20 2d 20 31 29 3b 0d |'A' - '9|' - 1);.|
|00002450| 09 09 76 61 6c 20 3d 20 | 28 76 61 6c 20 3c 3c 20 |..val = |(val << |
|00002460| 34 29 20 2b 20 63 68 72 | 20 2d 20 27 30 27 3b 0d |4) + chr| - '0';.|
|00002470| 09 7d 0d 09 72 65 74 75 | 72 6e 28 76 61 6c 29 3b |.}..retu|rn(val);|
|00002480| 0d 7d 0d 0d 63 68 61 72 | 09 4c 6f 63 6b 48 61 6e |.}..char|.LockHan|
|00002490| 64 6c 65 48 69 67 68 28 | 48 61 6e 64 6c 65 20 74 |dleHigh(|Handle t|
|000024a0| 68 65 48 61 6e 64 6c 65 | 29 0d 7b 0d 09 63 68 61 |heHandle|).{..cha|
|000024b0| 72 09 68 73 74 61 74 65 | 3b 0d 0d 09 68 73 74 61 |r.hstate|;...hsta|
|000024c0| 74 65 20 3d 20 48 47 65 | 74 53 74 61 74 65 28 74 |te = HGe|tState(t|
|000024d0| 68 65 48 61 6e 64 6c 65 | 29 3b 0d 09 4d 6f 76 65 |heHandle|);..Move|
|000024e0| 48 48 69 28 74 68 65 48 | 61 6e 64 6c 65 29 3b 0d |HHi(theH|andle);.|
|000024f0| 09 48 4c 6f 63 6b 28 74 | 68 65 48 61 6e 64 6c 65 |.HLock(t|heHandle|
|00002500| 29 3b 0d 09 72 65 74 75 | 72 6e 28 68 73 74 61 74 |);..retu|rn(hstat|
|00002510| 65 29 3b 0d 7d 0d 0d 52 | 65 63 74 09 47 65 74 57 |e);.}..R|ect.GetW|
|00002520| 69 6e 64 6f 77 53 74 72 | 75 63 74 75 72 65 52 65 |indowStr|uctureRe|
|00002530| 63 74 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |ct(Windo|wPtr win|
|00002540| 64 6f 77 29 0d 7b 0d 23 | 64 65 66 69 6e 65 20 6b |dow).{.#|define k|
|00002550| 4f 66 66 73 63 72 65 65 | 6e 4c 6f 63 20 30 78 34 |Offscree|nLoc 0x4|
|00002560| 30 30 30 0d 0d 09 47 72 | 61 66 50 74 72 09 09 6f |000...Gr|afPtr..o|
|00002570| 6c 64 50 6f 72 74 3b 0d | 09 52 65 63 74 09 09 73 |ldPort;.|.Rect..s|
|00002580| 74 72 75 63 74 75 72 65 | 52 65 63 74 3b 0d 09 50 |tructure|Rect;..P|
|00002590| 6f 69 6e 74 09 09 77 69 | 6e 64 6f 77 4c 6f 63 3b |oint..wi|ndowLoc;|
|000025a0| 0d 09 0d 09 69 66 20 28 | 28 28 57 69 6e 64 6f 77 |....if (|((Window|
|000025b0| 50 65 65 6b 29 77 69 6e | 64 6f 77 29 2d 3e 76 69 |Peek)win|dow)->vi|
|000025c0| 73 69 62 6c 65 29 0d 09 | 09 73 74 72 75 63 74 75 |sible)..|.structu|
|000025d0| 72 65 52 65 63 74 20 3d | 20 28 2a 28 28 28 57 69 |reRect =| (*(((Wi|
|000025e0| 6e 64 6f 77 50 65 65 6b | 29 77 69 6e 64 6f 77 29 |ndowPeek|)window)|
|000025f0| 2d 3e 73 74 72 75 63 52 | 67 6e 29 29 2d 3e 72 67 |->strucR|gn))->rg|
|00002600| 6e 42 42 6f 78 3b 0d 0d | 09 65 6c 73 65 20 7b 0d |nBBox;..|.else {.|
|00002610| 09 09 47 65 74 50 6f 72 | 74 28 26 6f 6c 64 50 6f |..GetPor|t(&oldPo|
|00002620| 72 74 29 3b 0d 09 09 53 | 65 74 50 6f 72 74 28 77 |rt);...S|etPort(w|
|00002630| 69 6e 64 6f 77 29 3b 0d | 09 09 77 69 6e 64 6f 77 |indow);.|..window|
|00002640| 4c 6f 63 20 3d 20 47 65 | 74 47 6c 6f 62 61 6c 54 |Loc = Ge|tGlobalT|
|00002650| 6f 70 4c 65 66 74 28 77 | 69 6e 64 6f 77 29 3b 0d |opLeft(w|indow);.|
|00002660| 09 09 4d 6f 76 65 57 69 | 6e 64 6f 77 28 77 69 6e |..MoveWi|ndow(win|
|00002670| 64 6f 77 2c 20 77 69 6e | 64 6f 77 4c 6f 63 2e 68 |dow, win|dowLoc.h|
|00002680| 2c 20 6b 4f 66 66 73 63 | 72 65 65 6e 4c 6f 63 2c |, kOffsc|reenLoc,|
|00002690| 20 66 61 6c 73 65 29 3b | 0d 09 09 53 68 6f 77 48 | false);|...ShowH|
|000026a0| 69 64 65 28 77 69 6e 64 | 6f 77 2c 20 74 72 75 65 |ide(wind|ow, true|
|000026b0| 29 3b 0d 09 09 73 74 72 | 75 63 74 75 72 65 52 65 |);...str|uctureRe|
|000026c0| 63 74 20 3d 20 28 2a 28 | 28 28 57 69 6e 64 6f 77 |ct = (*(|((Window|
|000026d0| 50 65 65 6b 29 77 69 6e | 64 6f 77 29 2d 3e 73 74 |Peek)win|dow)->st|
|000026e0| 72 75 63 52 67 6e 29 29 | 2d 3e 72 67 6e 42 42 6f |rucRgn))|->rgnBBo|
|000026f0| 78 3b 0d 09 09 53 68 6f | 77 48 69 64 65 28 77 69 |x;...Sho|wHide(wi|
|00002700| 6e 64 6f 77 2c 20 66 61 | 6c 73 65 29 3b 0d 09 09 |ndow, fa|lse);...|
|00002710| 4d 6f 76 65 57 69 6e 64 | 6f 77 28 77 69 6e 64 6f |MoveWind|ow(windo|
|00002720| 77 2c 20 77 69 6e 64 6f | 77 4c 6f 63 2e 68 2c 20 |w, windo|wLoc.h, |
|00002730| 77 69 6e 64 6f 77 4c 6f | 63 2e 76 2c 20 66 61 6c |windowLo|c.v, fal|
|00002740| 73 65 29 3b 0d 09 09 53 | 65 74 50 6f 72 74 28 6f |se);...S|etPort(o|
|00002750| 6c 64 50 6f 72 74 29 3b | 0d 09 09 4f 66 66 73 65 |ldPort);|...Offse|
|00002760| 74 52 65 63 74 28 26 73 | 74 72 75 63 74 75 72 65 |tRect(&s|tructure|
|00002770| 52 65 63 74 2c 20 30 2c | 20 77 69 6e 64 6f 77 4c |Rect, 0,| windowL|
|00002780| 6f 63 2e 76 20 2d 20 6b | 4f 66 66 73 63 72 65 65 |oc.v - k|Offscree|
|00002790| 6e 4c 6f 63 29 3b 0d 09 | 7d 0d 09 72 65 74 75 72 |nLoc);..|}..retur|
|000027a0| 6e 28 73 74 72 75 63 74 | 75 72 65 52 65 63 74 29 |n(struct|ureRect)|
|000027b0| 3b 0d 7d 0d 0d 50 6f 69 | 6e 74 09 47 65 74 47 6c |;.}..Poi|nt.GetGl|
|000027c0| 6f 62 61 6c 54 6f 70 4c | 65 66 74 28 57 69 6e 64 |obalTopL|eft(Wind|
|000027d0| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 29 0d 7b 0d |owPtr wi|ndow).{.|
|000027e0| 09 47 72 61 66 50 74 72 | 09 09 09 6f 6c 64 50 6f |.GrafPtr|...oldPo|
|000027f0| 72 74 3b 0d 09 50 6f 69 | 6e 74 09 09 09 67 6c 6f |rt;..Poi|nt...glo|
|00002800| 62 61 6c 50 74 3b 0d 09 | 0d 09 47 65 74 50 6f 72 |balPt;..|..GetPor|
|00002810| 74 28 26 6f 6c 64 50 6f | 72 74 29 3b 0d 09 53 65 |t(&oldPo|rt);..Se|
|00002820| 74 50 6f 72 74 28 77 69 | 6e 64 6f 77 29 3b 0d 09 |tPort(wi|ndow);..|
|00002830| 67 6c 6f 62 61 6c 50 74 | 20 3d 20 54 6f 70 4c 65 |globalPt| = TopLe|
|00002840| 66 74 28 77 69 6e 64 6f | 77 2d 3e 70 6f 72 74 52 |ft(windo|w->portR|
|00002850| 65 63 74 29 3b 0d 09 4c | 6f 63 61 6c 54 6f 47 6c |ect);..L|ocalToGl|
|00002860| 6f 62 61 6c 28 26 67 6c | 6f 62 61 6c 50 74 29 3b |obal(&gl|obalPt);|
|00002870| 0d 09 53 65 74 50 6f 72 | 74 28 6f 6c 64 50 6f 72 |..SetPor|t(oldPor|
|00002880| 74 29 3b 0d 09 72 65 74 | 75 72 6e 28 67 6c 6f 62 |t);..ret|urn(glob|
|00002890| 61 6c 50 74 29 3b 0d 7d | 0d 0d 76 6f 69 64 09 50 |alPt);.}|..void.P|
|000028a0| 6f 73 69 74 69 6f 6e 52 | 65 63 74 49 6e 52 65 63 |ositionR|ectInRec|
|000028b0| 74 28 52 65 63 74 20 6f | 75 74 65 72 52 65 63 74 |t(Rect o|uterRect|
|000028c0| 2c 20 52 65 63 74 20 2a | 69 6e 6e 65 72 52 65 63 |, Rect *|innerRec|
|000028d0| 74 2c 20 46 69 78 65 64 | 20 68 6f 72 7a 52 61 74 |t, Fixed| horzRat|
|000028e0| 69 6f 2c 20 46 69 78 65 | 64 20 76 65 72 74 52 61 |io, Fixe|d vertRa|
|000028f0| 74 69 6f 29 0d 7b 0d 09 | 73 68 6f 72 74 09 09 6f |tio).{..|short..o|
|00002900| 75 74 65 72 52 65 63 74 | 48 65 69 67 68 74 3b 0d |uterRect|Height;.|
|00002910| 09 73 68 6f 72 74 09 09 | 6f 75 74 65 72 52 65 63 |.short..|outerRec|
|00002920| 74 57 69 64 74 68 3b 0d | 09 73 68 6f 72 74 09 09 |tWidth;.|.short..|
|00002930| 69 6e 6e 65 72 52 65 63 | 74 48 65 69 67 68 74 3b |innerRec|tHeight;|
|00002940| 0d 09 73 68 6f 72 74 09 | 09 69 6e 6e 65 72 52 65 |..short.|.innerRe|
|00002950| 63 74 57 69 64 74 68 3b | 0d 09 73 68 6f 72 74 09 |ctWidth;|..short.|
|00002960| 09 79 4c 6f 63 61 74 69 | 6f 6e 3b 0d 09 73 68 6f |.yLocati|on;..sho|
|00002970| 72 74 09 09 78 4c 6f 63 | 61 74 69 6f 6e 3b 0d 0d |rt..xLoc|ation;..|
|00002980| 09 6f 75 74 65 72 52 65 | 63 74 48 65 69 67 68 74 |.outerRe|ctHeight|
|00002990| 20 3d 20 6f 75 74 65 72 | 52 65 63 74 2e 62 6f 74 | = outer|Rect.bot|
|000029a0| 74 6f 6d 20 2d 20 6f 75 | 74 65 72 52 65 63 74 2e |tom - ou|terRect.|
|000029b0| 74 6f 70 3b 0d 09 6f 75 | 74 65 72 52 65 63 74 57 |top;..ou|terRectW|
|000029c0| 69 64 74 68 20 3d 20 6f | 75 74 65 72 52 65 63 74 |idth = o|uterRect|
|000029d0| 2e 72 69 67 68 74 20 2d | 20 6f 75 74 65 72 52 65 |.right -| outerRe|
|000029e0| 63 74 2e 6c 65 66 74 3b | 0d 0d 09 69 6e 6e 65 72 |ct.left;|...inner|
|000029f0| 52 65 63 74 48 65 69 67 | 68 74 20 3d 20 69 6e 6e |RectHeig|ht = inn|
|00002a00| 65 72 52 65 63 74 2d 3e | 62 6f 74 74 6f 6d 20 2d |erRect->|bottom -|
|00002a10| 20 69 6e 6e 65 72 52 65 | 63 74 2d 3e 74 6f 70 3b | innerRe|ct->top;|
|00002a20| 0d 09 69 6e 6e 65 72 52 | 65 63 74 57 69 64 74 68 |..innerR|ectWidth|
|00002a30| 20 3d 20 69 6e 6e 65 72 | 52 65 63 74 2d 3e 72 69 | = inner|Rect->ri|
|00002a40| 67 68 74 20 2d 20 69 6e | 6e 65 72 52 65 63 74 2d |ght - in|nerRect-|
|00002a50| 3e 6c 65 66 74 3b 0d 09 | 09 79 4c 6f 63 61 74 69 |>left;..|.yLocati|
|00002a60| 6f 6e 20 3d 20 46 69 78 | 32 4c 6f 6e 67 28 46 69 |on = Fix|2Long(Fi|
|00002a70| 78 4d 75 6c 28 4c 6f 6e | 67 32 46 69 78 28 6f 75 |xMul(Lon|g2Fix(ou|
|00002a80| 74 65 72 52 65 63 74 48 | 65 69 67 68 74 20 2d 20 |terRectH|eight - |
|00002a90| 69 6e 6e 65 72 52 65 63 | 74 48 65 69 67 68 74 29 |innerRec|tHeight)|
|00002aa0| 2c 20 76 65 72 74 52 61 | 74 69 6f 29 29 0d 09 09 |, vertRa|tio))...|
|00002ab0| 09 2b 20 6f 75 74 65 72 | 52 65 63 74 2e 74 6f 70 |.+ outer|Rect.top|
|00002ac0| 3b 0d 09 09 78 4c 6f 63 | 61 74 69 6f 6e 20 3d 20 |;...xLoc|ation = |
|00002ad0| 46 69 78 32 4c 6f 6e 67 | 28 46 69 78 4d 75 6c 28 |Fix2Long|(FixMul(|
|00002ae0| 4c 6f 6e 67 32 46 69 78 | 28 6f 75 74 65 72 52 65 |Long2Fix|(outerRe|
|00002af0| 63 74 57 69 64 74 68 20 | 2d 20 69 6e 6e 65 72 52 |ctWidth |- innerR|
|00002b00| 65 63 74 57 69 64 74 68 | 29 2c 20 68 6f 72 7a 52 |ectWidth|), horzR|
|00002b10| 61 74 69 6f 29 29 0d 09 | 09 09 2b 20 6f 75 74 65 |atio))..|..+ oute|
|00002b20| 72 52 65 63 74 2e 6c 65 | 66 74 3b 0d 0d 09 69 6e |rRect.le|ft;...in|
|00002b30| 6e 65 72 52 65 63 74 2d | 3e 74 6f 70 20 3d 20 79 |nerRect-|>top = y|
|00002b40| 4c 6f 63 61 74 69 6f 6e | 3b 0d 09 69 6e 6e 65 72 |Location|;..inner|
|00002b50| 52 65 63 74 2d 3e 6c 65 | 66 74 20 3d 20 78 4c 6f |Rect->le|ft = xLo|
|00002b60| 63 61 74 69 6f 6e 3b 0d | 09 69 6e 6e 65 72 52 65 |cation;.|.innerRe|
|00002b70| 63 74 2d 3e 62 6f 74 74 | 6f 6d 20 3d 20 79 4c 6f |ct->bott|om = yLo|
|00002b80| 63 61 74 69 6f 6e 20 2b | 20 69 6e 6e 65 72 52 65 |cation +| innerRe|
|00002b90| 63 74 48 65 69 67 68 74 | 3b 0d 09 69 6e 6e 65 72 |ctHeight|;..inner|
|00002ba0| 52 65 63 74 2d 3e 72 69 | 67 68 74 20 3d 20 78 4c |Rect->ri|ght = xL|
|00002bb0| 6f 63 61 74 69 6f 6e 20 | 2b 20 69 6e 6e 65 72 52 |ocation |+ innerR|
|00002bc0| 65 63 74 57 69 64 74 68 | 3b 0d 7d 0d 0d 52 65 63 |ectWidth|;.}..Rec|
|00002bd0| 74 09 47 65 74 57 69 6e | 64 6f 77 43 6f 6e 74 65 |t.GetWin|dowConte|
|00002be0| 6e 74 52 65 63 74 28 57 | 69 6e 64 6f 77 50 74 72 |ntRect(W|indowPtr|
|00002bf0| 20 77 69 6e 64 6f 77 29 | 0d 7b 0d 09 57 69 6e 64 | window)|.{..Wind|
|00002c00| 6f 77 50 74 72 09 6f 6c | 64 50 6f 72 74 3b 0d 09 |owPtr.ol|dPort;..|
|00002c10| 52 65 63 74 09 09 63 6f | 6e 74 65 6e 74 52 65 63 |Rect..co|ntentRec|
|00002c20| 74 3b 0d 0d 09 47 65 74 | 50 6f 72 74 28 26 6f 6c |t;...Get|Port(&ol|
|00002c30| 64 50 6f 72 74 29 3b 0d | 09 53 65 74 50 6f 72 74 |dPort);.|.SetPort|
|00002c40| 28 77 69 6e 64 6f 77 29 | 3b 0d 09 63 6f 6e 74 65 |(window)|;..conte|
|00002c50| 6e 74 52 65 63 74 20 3d | 20 77 69 6e 64 6f 77 2d |ntRect =| window-|
|00002c60| 3e 70 6f 72 74 52 65 63 | 74 3b 0d 09 4c 6f 63 61 |>portRec|t;..Loca|
|00002c70| 6c 54 6f 47 6c 6f 62 61 | 6c 52 65 63 74 28 26 63 |lToGloba|lRect(&c|
|00002c80| 6f 6e 74 65 6e 74 52 65 | 63 74 29 3b 0d 09 53 65 |ontentRe|ct);..Se|
|00002c90| 74 50 6f 72 74 28 6f 6c | 64 50 6f 72 74 29 3b 0d |tPort(ol|dPort);.|
|00002ca0| 09 72 65 74 75 72 6e 28 | 63 6f 6e 74 65 6e 74 52 |.return(|contentR|
|00002cb0| 65 63 74 29 3b 0d 7d 0d | 0d 76 6f 69 64 09 4c 6f |ect);.}.|.void.Lo|
|00002cc0| 63 61 6c 54 6f 47 6c 6f | 62 61 6c 52 65 63 74 28 |calToGlo|balRect(|
|00002cd0| 52 65 63 74 20 2a 61 52 | 65 63 74 29 0d 7b 0d 09 |Rect *aR|ect).{..|
|00002ce0| 4c 6f 63 61 6c 54 6f 47 | 6c 6f 62 61 6c 28 26 54 |LocalToG|lobal(&T|
|00002cf0| 6f 70 4c 65 66 74 28 2a | 61 52 65 63 74 29 29 3b |opLeft(*|aRect));|
|00002d00| 0d 09 4c 6f 63 61 6c 54 | 6f 47 6c 6f 62 61 6c 28 |..LocalT|oGlobal(|
|00002d10| 26 42 6f 74 52 69 67 68 | 74 28 2a 61 52 65 63 74 |&BotRigh|t(*aRect|
|00002d20| 29 29 3b 0d 7d 0d 0d 76 | 6f 69 64 09 70 73 74 72 |));.}..v|oid.pstr|
|00002d30| 63 61 74 28 63 68 61 72 | 20 2a 64 2c 20 63 68 61 |cat(char| *d, cha|
|00002d40| 72 20 2a 73 29 0d 7b 0d | 09 73 68 6f 72 74 09 69 |r *s).{.|.short.i|
|00002d50| 3b 0d 0d 09 66 6f 72 20 | 28 69 20 3d 20 30 3b 20 |;...for |(i = 0; |
|00002d60| 69 20 3c 20 73 5b 30 5d | 3b 29 0d 09 09 64 5b 2b |i < s[0]|;)...d[+|
|00002d70| 2b 64 5b 30 5d 5d 20 3d | 20 73 5b 2b 2b 69 5d 3b |+d[0]] =| s[++i];|
|00002d80| 0d 7d 0d 0d 76 6f 69 64 | 09 70 73 74 72 63 70 79 |.}..void|.pstrcpy|
|00002d90| 28 63 68 61 72 20 2a 64 | 2c 20 63 68 61 72 20 2a |(char *d|, char *|
|00002da0| 73 29 0d 7b 0d 09 73 68 | 6f 72 74 09 69 3b 0d 0d |s).{..sh|ort.i;..|
|00002db0| 09 69 20 3d 20 2a 73 3b | 0d 09 64 6f 20 7b 0d 09 |.i = *s;|..do {..|
|00002dc0| 09 64 5b 69 5d 20 3d 20 | 73 5b 69 5d 3b 0d 09 7d |.d[i] = |s[i];..}|
|00002dd0| 20 77 68 69 6c 65 20 28 | 69 2d 2d 29 3b 0d 7d 0d | while (|i--);.}.|
|00002de0| 0d 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|00002df0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002e00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002e10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002e20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00002e30| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e80| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00002e90| 48 53 65 74 53 74 61 74 | 65 28 5f 5f 41 30 2c 5f |HSetStat|e(__A0,_|
|00002ea0| 5f 44 30 29 0d 70 61 73 | 63 61 6c 20 76 6f 69 64 |_D0).pas|cal void|
|00002eb0| 0f 53 69 6d 70 6c 65 49 | 6e 55 74 69 6c 73 2e 63 |.SimpleI|nUtils.c|
|00002ec0| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 00 00 |....TEXT|MPS ....|
|00002ed0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 00 |..TEXTMP|S ......|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 a4 cd 67 00 00 00 | 2d b1 00 00 01 ac 5f 41 |....g...|-....._A|
|00002f00| 30 29 0d 70 61 73 63 61 | 6c 20 76 6f 69 64 20 53 |0).pasca|l void S|
|00002f10| 65 74 41 70 70 6c 42 61 | 73 65 28 76 6f 69 64 20 |etApplBa|se(void |
|00002f20| 2a 73 74 61 72 74 50 74 | 72 29 0d 20 20 20 20 3d |*startPt|r). =|
|00002f30| 20 30 78 41 30 35 37 3b | 20 0d 70 61 73 63 61 6c | 0xA057;| .pascal|
|00002f40| 20 76 6f 69 64 20 4d 61 | 78 41 70 70 6c 5a 6f 6e | void Ma|xApplZon|
|00002f50| 65 28 76 6f 69 64 29 0d | 20 20 20 20 3d 20 30 78 |e(void).| = 0x|
|00002f60| 41 30 36 33 3b 20 0d 23 | 70 72 61 67 6d 61 20 70 |A063; .#|pragma p|
|00002f70| 61 72 61 6d 65 74 65 72 | 20 5f 5f 44 30 20 48 6f |arameter| __D0 Ho|
|00002f80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 2a 2a 2a |...H..Mo|naco.***|
|00002f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002fa0| 2a 2a 2a 2a 2a 2a 00 06 | 00 04 00 27 00 09 01 d0 |******..|...'....|
|00002fb0| 02 50 00 76 00 0b 02 1f | 02 52 a5 62 ec 76 00 00 |.P.v....|.R.b.v..|
|00002fc0| 22 5f 00 00 22 5f 00 00 | 21 c1 01 00 00 00 00 1e |"_.."_..|!.......|
|00002fd0| 00 27 00 09 01 d0 02 50 | 00 76 00 0b 02 1f 02 52 |.'.....P|.v.....R|
|00002fe0| 00 00 21 c1 00 00 00 00 | 00 00 00 00 00 00 00 00 |..!.....|........|
|00002ff0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 c0 |.....n..|.n...>..|
|00003000| db 5c 08 74 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.\.t....|.>..MPSR|
|00003010| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00003020| 03 f0 ff ff 00 00 00 4c | 00 c2 d9 b8 00 00 00 00 |.......L|........|
|00003030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+